Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AESGCM ¶
type AESGCM struct {
// contains filtered or unexported fields
}
func NewAESGCM ¶
AES CGM encrypter / decrypter. Accepts a logger and optional source of entropy, such as the TPM or an HSM. A randomly generated nonce, not exceeding 96 bits, is automatically generated to add nonce misuse-resistance.
In addition, this code wraps the panic that the Golang runtime throws when a nonce is incorrect, a message is too large, or a buffer overlap is detected, and returns a recoverable error instead of allowing it to crash servers. https://pkg.go.dev/crypto/cipher https://datatracker.ietf.org/doc/html/rfc8452
func (AESGCM) GenerateKey ¶
Generates and returns an AES-256 32 byte key encoded to hexidecimal
func (AESGCM) Open ¶
func (this AESGCM) Open(key, ciphertext, nonce, additionalData []byte) (plaintext []byte, err error)
Seal encrypts and authenticates plaintext, authenticates the additional data and