Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ModeToNewKeyFunc = map[state.Mode]func() []byte{ state.AESCBC: NewAES256Key, state.AESGCM: NewAES256Key, state.SecretBox: NewAES256Key, state.Identity: NewIdentityKey, } )
Functions ¶
func CheckRSAKeyPair ¶
CheckRSAKeyPair returns an error if the provided public and private key bytes do not comprise a valid RSA key pair.
func GenerateRSAKeyPair ¶
GenerateRSAKeyPair creates a new RSA key pair and returns the public and private keys as PEM-encoded bytes.
func NewAES256Key ¶
func NewAES256Key() []byte
func NewIdentityKey ¶
func NewIdentityKey() []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.