Kryptex.Cipher (kryptex v0.1.0)

Copy Markdown View Source

AES-256-GCM encrypt/decrypt implementation with key rotation metadata.

Payload format:

<<version::8, key_id::32, iv::binary-16, tag::binary-16, ciphertext::binary>>

Summary

Functions

decrypt(arg1)

@spec decrypt(binary()) :: {:ok, binary()} | {:error, term()}

encrypt(plaintext)

@spec encrypt(binary()) :: {:ok, binary()} | {:error, term()}