typedef struct chacha_ctx {
chacha_matrix a;
- octet buf[CHACHA_OUTSZ];
- size_t bufi;
+ octet b[CHACHA_OUTSZ];
+ unsigned off;
} chacha_ctx;
#define XCHACHA_DEFCTX(name) \
*/
extern void chacha_init(chacha_ctx */*ctx*/,
- const void */*key*/, size_t /*ksz*/,
- const void */*nonce*/);
+ const void */*key*/, size_t /*ksz*/,
+ const void */*nonce*/);
/* --- @chacha_setnonce{,_ietf}@ --- *
*
#define xchacha12_keysz chacha_keysz
#define xchacha8_keysz chacha_keysz
-const gccipher chacha20, chacha12, chacha8;
-const gccipher chacha20_ietf, chacha12_ietf, chacha8_ietf;
-const gccipher xchacha20, xchacha12, xchacha8;
+extern const gccipher chacha20, chacha12, chacha8;
+extern const gccipher chacha20_ietf, chacha12_ietf, chacha8_ietf;
+extern const gccipher xchacha20, xchacha12, xchacha8;
/*----- Generic random number generator interface -------------------------*/