Documentation ¶
Overview ¶
Package conceal provides the ability to encrypt/decrypt byte slices using aes encryption. Its primary job is to encrypt and base64-encode a byte slice. It base64-decodes and decrypts data given a Cloak instantited with the same pin used to encrypt the data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CipherLengthError ¶
type CipherLengthError struct{}
func (CipherLengthError) Error ¶
func (err CipherLengthError) Error() string
CipherLengthError occurs when the data passed in to Unveil is shorter than the length of the 16 byte encryption key.
type Cloak ¶
type Cloak struct {
// contains filtered or unexported fields
}
A Cloak encrypts and decrypts []byte using Veil and Unveil.
func NewCloak ¶
NewCloak takes a key that is resized to 16 bytes and used as a key in AES encryption. It returns a Cloak. If the key cannot be used to create a cipherBlock, an error is returned.
Click to show internal directories.
Click to hide internal directories.