diff options
Diffstat (limited to '')
-rw-r--r-- | libhashsum.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libhashsum.h b/libhashsum.h index 29a8f6f..65c3a66 100644 --- a/libhashsum.h +++ b/libhashsum.h @@ -37,8 +37,8 @@ */ enum libhashsum_algorithm { /* since 1.0 */ - LIBHASHSUM_MD2, /**< MD2 */ - LIBHASHSUM_MD4, /**< MD4 */ + LIBHASHSUM_MD2, /**< MD2; this algorithm has been theoretically compromised */ + LIBHASHSUM_MD4, /**< MD4; this algorithm has been compromised */ LIBHASHSUM_MD5, /**< MD5; this algorithm has been compromised */ LIBHASHSUM_RIPEMD_128, /**< RIPEMD-128 */ LIBHASHSUM_RIPEMD_160, /**< RIPEMD-160 */ @@ -422,8 +422,9 @@ union libhashsum_state { uint8_t *dyn; } sum; const char *suffix; + size_t squeezes; char algostr[256]; - } keccak; /* size = [1020, 1065] */ + } keccak; /* size = [1024, 1072] */ #endif #ifdef LIBHASHSUM_INCLUDE_LIBBLAKE_STATE @@ -974,6 +975,7 @@ int libhashsum_init_keccak_512_hasher(struct libhashsum_hasher *this); * @param ratebits Bitrate (in bits), 0 for automatic * @param capbits Capacity in bits, 0 for automatic * @param hashbits Hash output size in bits, 0 for automatic + * @param squeezes The number of squeezes to performed, 0 for automatic (which is 1) * @return 0 on success, -1 on failure * * @throws EINVAL (`ratebits`, `capbits`, `hashbits`) is invalid @@ -983,7 +985,8 @@ int libhashsum_init_keccak_512_hasher(struct libhashsum_hasher *this); * @since 1.0 */ LIBHASHSUM_1_NONNULL_ -int libhashsum_init_keccak_hasher(struct libhashsum_hasher *this, size_t ratebits, size_t capbits, size_t hashbits); +int libhashsum_init_keccak_hasher(struct libhashsum_hasher *this, size_t ratebits, + size_t capbits, size_t hashbits, size_t squeezes); /** * Create an initialised state for SHA3-224 |