Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEncodedNACLKeyPair ¶
func GenerateEncodedNACLKeyPair() (marshaledEncryptorKey []byte, marshaledDecryptorKey []byte, err error)
GenerateEncodedNACLKeyPair returns to byte slice containing the encoded values of the couple of keypairs freshly generated.
func GenerateKeyPair ¶
GenerateKeyPair returns a couple keypairs that can be used for asymmetric encryption/decryption using nacl crypto box API.
func MarshalNACLKey ¶
MarshalNACLKey takes a key and returns its encoded version.
Types ¶
type NACLKey ¶
type NACLKey struct {
// contains filtered or unexported fields
}
NACLKey contains a NACL crypto box keypair.
func UnmarshalNACLKey ¶
UnmarshalNACLKey takes and encoded value of a keypair and unmarshal its value, returning the associated key.
func (*NACLKey) PrivateKey ¶
PrivateKey returns the private part of the keypair.
Click to show internal directories.
Click to hide internal directories.