Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Key ¶
type Key [32]byte
Key ...
func NewEncryptionKey ¶
NewEncryptionKey generates a random 256-bit key for Encrypt() and Decrypt(). If text is nil or empty, creates a random key. It panics if the source of randomness fails. If text is not nil and not empty, and the length of text is lower than 32, the key is completed with spaces. If text is not nil and not empty, and the length of text us greater than 32, the 32 first bytes are used as key.
Click to show internal directories.
Click to hide internal directories.