def aead.seal.words

bend-kit-crypto@0.2.2.2 · crypto.bend:98

import bend-kit-crypto@0.2.2.2/crypto.bend as Crypto
import Base

98# AEAD: alg is "AES-256-GCM" or "CHACHA20-POLY1305". Key: 32 octets; nonce: 12 octets.
99# Seal returns ciphertext followed by a 16-octet tag; open verifies the tag before returning plaintext.
100# Never reuse a (key, nonce) pair. Bad lengths, algorithm or authentication fail with EINVAL.
101def aead.seal.words(alg: String, klen: U32, key: Array<U32>, nlen: U32, nonce: Array<U32>,
102  alen: U32, aad: Array<U32>, dlen: U32, data: Array<U32>) ->
103  IO(Result<&1, &1, U32 & String, U32 & Array<U32>>):
104  import "./effs/crypto.c"
105  import "./effs/crypto.js"

Uses (6)

Used by (0)

No other definition uses this definition.