X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/8276a9c565bc29afbc6cc120dfde0801c06c2bbd..HEAD:/symm/chacha.h diff --git a/symm/chacha.h b/symm/chacha.h index 4e5a765a..6c380dca 100644 --- a/symm/chacha.h +++ b/symm/chacha.h @@ -64,8 +64,8 @@ typedef uint32 chacha_matrix[16]; 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) \ @@ -89,8 +89,8 @@ XCHACHA_DEFCTX(xchacha8_ctx); */ 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}@ --- * * @@ -319,9 +319,9 @@ extern const octet chacha_keysz[]; #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 -------------------------*/