core/crypto/deoxysii
deoxysii
Types
1Constants
3Procedures
5init
init :: proc(ctx: ^Context, key: []u8, impl = aes.DEFAULT_IMPLEMENTATION)Sourceinit initializes a Context with the provided key.
is_hardware_accelerated
is_hardware_accelerated :: proc() -> (bool)Sourceis_hardware_accelerated returns true if and only if (⟺) hardware accelerated Deoxys-II is supported.
open
open :: proc(
ctx: ^Context,
dst: []u8,
iv: []u8,
aad: []u8,
ciphertext: []u8,
tag: []u8,
) -> (bool)Sourceopen authenticates the aad and ciphertext, and decrypts the ciphertext, with the provided Context, 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.
reset
reset :: proc(ctx: ^Context)Sourcereset sanitizes the Context. The Context must be re-initialized to be used again.
seal
seal :: proc(
ctx: ^Context,
dst: []u8,
tag: []u8,
iv: []u8,
aad: []u8,
plaintext: []u8,
)Sourceseal encrypts the plaintext and authenticates the aad and ciphertext, with the provided Context and iv, stores the output in dst and tag.
dst and plaintext MUST alias exactly or not at all.