Documentation ¶
Index ¶
- func ByteToPGPKey(pubKey []byte) (*crypto.Key, error)
- func GenerateIDPem() (string, error)
- func GeneratePGPKey(name string) (string, error)
- func MarshalIDPrivateKey(prvKey crypto.PrivKey) (string, error)
- func NewKeyPair() (crypto.PrivKey, crypto.PubKey, error)
- func UnmarshalIDPrivateKey(pemEncoded string) (crypto.PrivKey, error)
- func UnmarshalPGPKey(armoredPrivkey string, passphrase *[]byte) (*crypto.Key, error)
- type PGPDecrypter
- type PGPEncrypter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToPGPKey ¶
ByteToPGPKey unmarshals unarmored pgp key
func GenerateIDPem ¶
func GeneratePGPKey ¶
GeneratePGPKey generate pgp key armored format
func MarshalIDPrivateKey ¶
MarshalIDPrivateKey will return the p2p id private key in pem encoded
func NewKeyPair ¶
NewKeyPair generate p2p id key pair
func UnmarshalIDPrivateKey ¶
UnmarshalIDPrivateKey receive p2p id private key in pem encoded
Types ¶
type PGPDecrypter ¶
type PGPDecrypter struct {
// contains filtered or unexported fields
}
func NewPGPDecrypter ¶
func NewPGPDecrypter(privKey *crypto.Key) (*PGPDecrypter, error)
func (*PGPDecrypter) DecryptMessage ¶
func (g *PGPDecrypter) DecryptMessage(encrypted []byte) ([]byte, error)
type PGPEncrypter ¶
type PGPEncrypter struct {
// contains filtered or unexported fields
}
func NewPGPEncrypter ¶
func NewPGPEncrypter(pubKey *crypto.Key) (*PGPEncrypter, error)
func (*PGPEncrypter) EncryptMessage ¶
func (g *PGPEncrypter) EncryptMessage(message []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.