Documentation ¶
Index ¶
- type PrivateKey
- func (z *PrivateKey) DecodeMsg(dc *msgp.Reader) (err error)
- func (pk *PrivateKey) DecryptArmored(armored string) ([]byte, error)
- func (z PrivateKey) EncodeMsg(en *msgp.Writer) (err error)
- func (z PrivateKey) MarshalMsg(b []byte) (o []byte, err error)
- func (z PrivateKey) Msgsize() (s int)
- func (pk *PrivateKey) PublicKey() (*PublicKey, error)
- func (k *PrivateKey) ToString() string
- func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error)
- type PublicKey
- func (z *PublicKey) DecodeMsg(dc *msgp.Reader) (err error)
- func (z PublicKey) EncodeMsg(en *msgp.Writer) (err error)
- func (pk *PublicKey) EncryptArmored(data []byte) (string, error)
- func (z PublicKey) MarshalMsg(b []byte) (o []byte, err error)
- func (z PublicKey) Msgsize() (s int)
- func (k *PublicKey) ToString() string
- func (z *PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey string
PrivateKey Key
func NewKey ¶
func NewKey(name, userStr string) (*PrivateKey, error)
NewKey Generates a new Curve25519 Pgp key
func (*PrivateKey) DecodeMsg ¶
func (z *PrivateKey) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*PrivateKey) DecryptArmored ¶
func (pk *PrivateKey) DecryptArmored(armored string) ([]byte, error)
DecryptArmored data with private key
func (PrivateKey) EncodeMsg ¶
func (z PrivateKey) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (PrivateKey) MarshalMsg ¶
func (z PrivateKey) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (PrivateKey) Msgsize ¶
func (z PrivateKey) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*PrivateKey) PublicKey ¶
func (pk *PrivateKey) PublicKey() (*PublicKey, error)
PublicKey of Private Key
func (*PrivateKey) ToString ¶
func (k *PrivateKey) ToString() string
func (*PrivateKey) UnmarshalMsg ¶
func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type PublicKey ¶
type PublicKey string
PublicKey Key
func (*PublicKey) EncryptArmored ¶
EncryptArmored encrypt data with public key
func (PublicKey) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Click to show internal directories.
Click to hide internal directories.