AesGcm
AES-GCM authenticated encryption/decryption module
This module provides support for AES-256-GCM (Galois/Counter Mode) encryption, which provides both confidentiality and authenticity. Crystal's standard library doesn't expose GCM authentication tag methods, so this module uses direct bindings to OpenSSL's C library.
Example:
cipher = AesGcm::Cipher.new
# Encryption
encrypted = cipher.encrypt(
key: "32_byte_key_here_____________",
plaintext: "secret message"
)
# Decryption
decrypted = cipher.decrypt(encrypted, key: "32_byte_key_here_____________")
Constants
VERSION = "0.1.0"