diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-24 11:26:42 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-24 11:26:42 +0200 |
commit | 3a73ab675a19e2ea29b4cb1385db0188ce4997f8 (patch) | |
tree | b010de454a833b01fe2ed469fd4f0fd699c59e50 /libhashsum.h | |
parent | Test partial byte support in SHA1 and SHA-224 (diff) | |
download | libhashsum-3a73ab675a19e2ea29b4cb1385db0188ce4997f8.tar.gz libhashsum-3a73ab675a19e2ea29b4cb1385db0188ce4997f8.tar.bz2 libhashsum-3a73ab675a19e2ea29b4cb1385db0188ce4997f8.tar.xz |
Make algorithms optional
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libhashsum.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/libhashsum.h b/libhashsum.h index 0bfb48a..1e453b3 100644 --- a/libhashsum.h +++ b/libhashsum.h @@ -382,7 +382,8 @@ struct libhashsum_hasher { * @param algorithm The hashing algorithm * @return 0 on success, -1 on failure * - * @throws EINVAL `algorithm` is unsupported + * @throws EINVAL `algorithm` is not recognised + * @throws ENOSYS Support for `algorithm` was excluded at compile time * * @since 1.0 */ @@ -396,7 +397,7 @@ int libhashsum_init_hasher(struct libhashsum_hasher *this, enum libhashsum_algor * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -410,7 +411,7 @@ int libhashsum_init_md2_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -424,7 +425,7 @@ int libhashsum_init_md4_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -438,7 +439,7 @@ int libhashsum_init_md5_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -452,7 +453,7 @@ int libhashsum_init_ripemd_128_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -466,7 +467,7 @@ int libhashsum_init_ripemd_160_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -480,7 +481,7 @@ int libhashsum_init_ripemd_256_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -494,7 +495,7 @@ int libhashsum_init_ripemd_320_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -508,7 +509,7 @@ int libhashsum_init_sha0_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -522,7 +523,7 @@ int libhashsum_init_sha1_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -536,7 +537,7 @@ int libhashsum_init_sha_224_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -550,7 +551,7 @@ int libhashsum_init_sha_256_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -564,7 +565,7 @@ int libhashsum_init_sha_384_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -578,7 +579,7 @@ int libhashsum_init_sha_512_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -592,7 +593,7 @@ int libhashsum_init_sha_512_224_hasher(struct libhashsum_hasher *this); * @param this The output parameter for the functions, details, and state * @return 0 on success, -1 on failure * - * Failure isn't actually possible, so this function always return 0 + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ @@ -612,6 +613,7 @@ int libhashsum_init_sha_512_256_hasher(struct libhashsum_hasher *this); * @throws EINVAL `hashbits` is invalid (neither 224, 256, 384, nor 512) * @throws EINVAL The combination of `algobits` and `hashbits` is invalid * (`hashbits` is 384 or 512 but `algobits` is 32) + * @throws ENOSYS Support was excluded at compile time * * @since 1.0 */ |