Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt decodes base64 string and decrypts to plaintext. Expects format: base64(nonce | ciphertext | authtag)
func Encrypt ¶
Encrypt encrypts plaintext and returns base64-encoded "nonce|ciphertext|authtag" All three components are packed into the base64 string for transport.
func ResetForTest ¶
func ResetForTest()
ResetForTest re-reads the secret key from environment, intended for tests that need to switch the active key via t.Setenv across packages. Production code MUST NOT call this.
Types ¶
type AESGCMEncryptor ¶
type AESGCMEncryptor struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.