Module rust_sodium::crypto::stream::aes128ctr [] [src]

AES 128 in CTR-mode This cipher is conjectured to meet the standard notion of unpredictability.

Structs

Key

Key for symmetric encryption

Nonce

Nonce for symmetric encryption

Constants

KEYBYTES

Number of bytes in a Key.

NONCEBYTES

Number of bytes in a Nonce.

Functions

gen_key

gen_key() randomly generates a key for symmetric encryption

gen_nonce

gen_nonce() randomly generates a nonce for symmetric encryption

stream

stream() produces a len-byte stream c as a function of a secret key k and a nonce n.

stream_xor

stream_xor() encrypts a message m using a secret key k and a nonce n. The stream_xor() function returns the ciphertext c.

stream_xor_inplace

stream_xor_inplace encrypts a message m using a secret key k and a nonce n. The stream_xor_inplace() function encrypts the message in place.