Skip to main content

Module primitives

Module primitives 

Source
Expand description

Primitive cryptographic operations used across various age components.

Functionsยง

aead_decrypt
decrypt[key](ciphertext) - decrypts a message of an expected fixed size.
aead_encrypt
encrypt[key](plaintext) - encrypts a message with a one-time key.
bech32_decode
Decodes a Bech32-encoded string, checks its HRP, and returns its contained data.
bech32_encode
Encodes data as a Bech32-encoded string with the given HRP.
bech32_encode_to_fmt
Encodes data to a format writer as a Bech32-encoded string with the given HRP.
hkdf
HKDF[salt, label](key, 32)
hpke_open
HPKE.OpenBase(enc, sk_recip, info, aad = "", ciphertext)
hpke_seal
HPKE.SealBase(pk_recip, info, aad = "", plaintext)