Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SymmetricDecrypt ¶
Types ¶
type AesGcm256 ¶
type AesGcm256 struct{}
func NewAesGcm256 ¶
func NewAesGcm256() *AesGcm256
func (*AesGcm256) Decrypt ¶
func (a *AesGcm256) Decrypt(ciphertext []byte, key []byte, normalizeWithSha256 bool) (plaintext []byte, err error)
256-bit AES-GCM with a random nonce Reference: https://github.com/gtank/cryptopasta/blob/master/encrypt.go Decrypt decrypts data using 256-bit AES-GCM. This both hides the content of the data and provides a check that it hasn't been altered. Expects input form nonce|ciphertext|tag where '|' indicates concatenation.
func (*AesGcm256) Encrypt ¶
func (a *AesGcm256) Encrypt(plaintext []byte, key []byte, normalizeWithSha256 bool) (ciphertext []byte, err error)
256-bit AES-GCM with a random nonce Reference: https://github.com/gtank/cryptopasta/blob/master/encrypt.go Encrypt encrypts data using 256-bit AES-GCM. This both hides the content of the data and provides a check that it hasn't been altered. Output takes the form nonce|ciphertext|tag where '|' indicates concatenation.
Click to show internal directories.
Click to hide internal directories.