Documentation
¶
Overview ¶
Package crypto is used to encrypt and decrypt string data using symmetric key encryption.
Index ¶
Constants ¶
View Source
const (
// DefaultCipherKeyLength is the required number of bytes for a cipher key.
DefaultCipherKeyLength = 32
)
Variables ¶
View Source
var ( // ErrCipherKeyMissing is issued when an encrypt/decrypt needed but we don't have a cipher key. ErrCipherKeyMissing = fmt.Errorf("no cipher key provided") // ErrCipherKeyLength is issued when a key is not long enough. ErrCipherKeyLength = fmt.Errorf("cipher key must be %d bytes", DefaultCipherKeyLength) // ErrCipherPassword is issued when a cipher key cannot be generated from the provided password. ErrCipherPassword = fmt.Errorf("cannot generate cipher key from provided password") )
Functions ¶
func CipherKeyCheck ¶
CipherKeyCheck will check the key meets starkdb requirements.
func Password2cipherkey ¶
Password2cipherkey will take a password and produce a 32 byte cipher key.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.