progs/perftest.c: Use from Glibc syscall numbers.
[catacomb] / symm / chacha.h
index 4e5a765..6c380dc 100644 (file)
@@ -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 -------------------------*/