diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-24 12:12:39 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-24 12:12:39 +0200 |
commit | 628cefa418f8ca713a1dddab5ffedfb539efce61 (patch) | |
tree | 4d5ea7c18e66aac63cd171fc32181fe4b0bda060 /libhashsum.h | |
parent | Add README (diff) | |
download | libhashsum-628cefa418f8ca713a1dddab5ffedfb539efce61.tar.gz libhashsum-628cefa418f8ca713a1dddab5ffedfb539efce61.tar.bz2 libhashsum-628cefa418f8ca713a1dddab5ffedfb539efce61.tar.xz |
Additional error conditions for libhashsum_init_hasher and libhashsum_init_hasher_from_string
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | libhashsum.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libhashsum.h b/libhashsum.h index 0e49083..541f4e6 100644 --- a/libhashsum.h +++ b/libhashsum.h @@ -396,7 +396,16 @@ struct libhashsum_hasher { * @return 0 on success, -1 on failure * * @throws EINVAL `algorithm` is not recognised + * @throws EINVAL `algorithm` requires parameters, and is therefore + * not supported by this function (use dedicated + * initialiser instead) * @throws ENOSYS Support for `algorithm` was excluded at compile time + * @throws ENOSYS The `algorithm` requires a newer version of the library + * that application was compiled for (the application + * is however linked to new enough version of the library) + * (specifically this means that the application's version + * of `union libhashsum_state`, and thus also + * `struct libhashsum_hasher`, is too small to store the state) * * @since 1.0 */ @@ -413,6 +422,12 @@ int libhashsum_init_hasher(struct libhashsum_hasher *this, enum libhashsum_algor * * @throws EINVAL `algorithm` is not recognised or contains an invalid value * @throws ENOSYS Support for `algorithm` was excluded at compile time + * @throws ENOSYS The `algorithm` requires a newer version of the library + * that application was compiled for (the application + * is however linked to new enough version of the library) + * (specifically this means that the application's version + * of `union libhashsum_state`, and thus also + * `struct libhashsum_hasher`, is too small to store the state) * * @since 1.0 */ |