Documentation
¶
Overview ¶
Package aes_gcm provides encryption and decryption functions using AES-GCM.
Index ¶
Constants ¶
const AES_GCM_AuthTagSize = 16
AES_GCM_AuthTagSize is the size of the authentication tag in AES-GCM. It is set to 16 bytes, which provides strong integrity protection.
const AES_GCM_NonceSize = 12
AES_GCM_NonceSize is the size of the nonce used in AES-GCM encryption. It is set to 12 bytes as recommended for AES-GCM.
Variables ¶
var (
ErrDuplicatedNonceUsed = errors.New("duplicate nonce used for AES/GCM decryption")
)
Functions ¶
func Decrypt_AES_GCM ¶
Decrypt_AES_GCM decrypts the ciphertext using AES-GCM with the provided key. It returns the plaintext and any error encountered.
func Encrypt_AES_GCM ¶
Encrypt_AES_GCM encrypts the plaintext using AES-GCM with the provided key. It returns the ciphertext (nonce + encrypted data) and any error encountered.
func IsAESPasswordSupported ¶
IsAESPasswordSupported checks if the given password is suitable for AES encryption. It returns true if the password length is 16, 24, or 32 bytes (128, 192, or 256 bits), which are the supported key sizes for AES.
Types ¶
This section is empty.