diff options
Diffstat (limited to 'lib/blake2/blake2s.h')
-rw-r--r-- | lib/blake2/blake2s.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/blake2/blake2s.h b/lib/blake2/blake2s.h index 64b4156..ede170c 100644 --- a/lib/blake2/blake2s.h +++ b/lib/blake2/blake2s.h @@ -4,8 +4,8 @@ #include <stdint.h> struct BLAKE2s_param { - uint8_t outlen; // digest length - uint8_t keylen; // key length + uint8_t outlen; /* digest length */ + uint8_t keylen; /* key length */ uint8_t fanout; uint8_t depth; uint32_t leaf_length; @@ -18,11 +18,11 @@ struct BLAKE2s_param { }; struct BLAKE2s_ctx { - uint8_t b[64]; // input buffer - size_t c; // pointer for b[] - uint32_t h[8]; // chained state vector h - uint32_t t[2]; // total number of bytes - struct BLAKE2s_param param; // parameter block + uint8_t b[64]; /* input buffer */ + size_t c; /* pointer for b[] */ + uint32_t h[8]; /* chained state vector h */ + uint32_t t[2]; /* total number of bytes */ + struct BLAKE2s_param param; /* parameter block */ }; /** @@ -41,11 +41,11 @@ int BLAKE2s_init(struct BLAKE2s_ctx *ctx, uint8_t outlen, const void *key, uint8 void BLAKE2s_update(struct BLAKE2s_ctx *ctx, const void *d, size_t dd); void BLAKE2s_final(struct BLAKE2s_ctx *ctx, void *out); -// All-in-one convenience function. -static inline int -BLAKE2s(void *out, uint8_t outlen, // return buffer for digest - const void *key, uint8_t keylen, // optional secret key - const void *in, size_t inlen) // data to be hashed +/* All-in-one convenience function. */ +static __inline__ int +BLAKE2s(void *out, uint8_t outlen, /* return buffer for digest */ + const void *key, uint8_t keylen, /* optional secret key */ + const void *in, size_t inlen) /* data to be hashed */ { struct BLAKE2s_ctx ctx; if (BLAKE2s_init(&ctx, outlen, key, keylen)) return -1; |