]>
iEval git - authen-passphrase-scrypt.git/blob - scrypt-1.2.1/libcperciva/crypto/crypto_aesctr.h
1 #ifndef _CRYPTO_AESCTR_H_
2 #define _CRYPTO_AESCTR_H_
12 * crypto_aesctr_init(key, nonce):
13 * Prepare to encrypt/decrypt data with AES in CTR mode, using the provided
14 * expanded key and nonce. The key provided must remain valid for the
15 * lifetime of the stream.
17 struct crypto_aesctr
* crypto_aesctr_init(const struct crypto_aes_key
*,
21 * crypto_aesctr_stream(stream, inbuf, outbuf, buflen):
22 * Generate the next ${buflen} bytes of the AES-CTR stream and xor them with
23 * bytes from ${inbuf}, writing the result into ${outbuf}. If the buffers
24 * ${inbuf} and ${outbuf} overlap, they must be identical.
26 void crypto_aesctr_stream(struct crypto_aesctr
*, const uint8_t *,
30 * crypto_aesctr_free(stream):
31 * Free the provided stream object.
33 void crypto_aesctr_free(struct crypto_aesctr
*);
36 * crypto_aesctr_buf(key, nonce, inbuf, outbuf, buflen):
37 * Equivalent to _init(key, nonce); _stream(inbuf, outbuf, buflen); _free().
39 void crypto_aesctr_buf(const struct crypto_aes_key
*, uint64_t,
40 const uint8_t *, uint8_t *, size_t);
42 #endif /* !_CRYPTO_AESCTR_H_ */
This page took 0.036111 seconds and 4 git commands to generate.