core/crypto/aes

aes

Types

4

Context_ECB

Context_ECB :: struct { _impl: Context_Impl, _is_initialized: bool, }Source

Context_ECB is a keyed AES-ECB instance.

WARNING: Using ECB mode is strongly discouraged unless it is being used to implement higher level constructs.

Constants

9

Procedures

14

open_gcm

open_gcm :: proc( ctx: ^Context_GCM, dst: []u8, iv: []u8, aad: []u8, ciphertext: []u8, tag: []u8, ) -> (bool)Source

open_gcm authenticates the aad and ciphertext, and decrypts the ciphertext, with the provided Context_GCM, iv, and tag, and stores the output in dst, returning true if and only if (⟺) the authentication was successful. If authentication fails, the destination buffer will be zeroed.

dst and plaintext MUST alias exactly or not at all.

seal_gcm

seal_gcm :: proc( ctx: ^Context_GCM, dst: []u8, tag: []u8, iv: []u8, aad: []u8, plaintext: []u8, )Source

seal_gcm encrypts the plaintext and authenticates the aad and ciphertext, with the provided Context_GCM and iv, stores the output in dst and tag.

dst and plaintext MUST alias exactly or not at all.

xor_bytes_ctr

xor_bytes_ctr :: proc(ctx: ^Context_CTR, dst: []u8, src: []u8)Source

xor_bytes_ctr XORs each byte in src with bytes taken from the AES-CTR keystream, and writes the resulting output to dst. dst and src MUST alias exactly or not at all.

Reference search

Find anything

Documentation preferences

Settings

System theme variants

Used only while Theme is set to System.