Documentation
¶
Index ¶
- Constants
- func Decrypt(id int, encryptedContent, nonce string, masterKey []byte) (plaintext string, err error)
- func Encrypt(id int, plaintext string, masterKey []byte) (encryptedContent, nonce string, err error)
- func Open(id int, stored string, masterKey []byte) (string, error)
- func Seal(id int, plaintext string, masterKey []byte) (string, error)
Constants ¶
View Source
const ( NonceSize = 12 // For AES-GCM KeySize = 32 // 256 bits )
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(id int, encryptedContent, nonce string, masterKey []byte) (plaintext string, err error)
Decrypt decrypts encrypted data using an ID
func Encrypt ¶
func Encrypt(id int, plaintext string, masterKey []byte) (encryptedContent, nonce string, err error)
Encrypt encrypts plaintext data using an ID Returns encrypted content (base64) and nonce (base64)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.