Aead.open: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/aead.bend as Aead Lines 68-74 of bend-collections-laws-crypto@1.0.0.0/src/crypto/aead.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aead.bend&start_line=68&end_line=74 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/aead/chacha20poly1305.bend as CP import bend-collections-laws-crypto@1.0.0.0/src/crypto/aesgcm.bend as GCM # The plaintext of ciphertext || tag, or None (decrypt checks the lengths first). def open(alg: Alg, +key: List<&2, U32>, +nonce: List<&2, U32>, +aad: List<&2, U32>, +data: List<&2, U32>) -> Maybe<&2, List<&2, U32>>: match alg: case CHACHA20_POLY1305{}: CP.open(key, nonce, aad, data) case XCHACHA20_POLY1305{}: CP.xopen(key, nonce, aad, data) case AES_128_GCM{}: GCM.aes128_gcm_decrypt(key, nonce, aad, data) case AES_256_GCM{}: GCM.aes256_gcm_decrypt(key, nonce, aad, data) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aead/chacha20poly1305.bend&name=open https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aead/chacha20poly1305.bend&name=xopen https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aead.bend&name=Alg https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aesgcm.bend&name=aes128_gcm_decrypt https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/aesgcm.bend&name=aes256_gcm_decrypt