diff options
author | Mattias Andrée <maandree@kth.se> | 2022-07-07 15:18:51 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2022-07-07 15:18:51 +0200 |
commit | 77e0e09222fdc121d9044289229a6f19c0ba406b (patch) | |
tree | a81363e9a94fdf92c1065fd926f6afa790c33169 /algorithm_output_size.c | |
parent | Add libsha2.7 (diff) | |
download | libsha2-77e0e09222fdc121d9044289229a6f19c0ba406b.tar.gz libsha2-77e0e09222fdc121d9044289229a6f19c0ba406b.tar.bz2 libsha2-77e0e09222fdc121d9044289229a6f19c0ba406b.tar.xz |
Inline the output size functions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | algorithm_output_size.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/algorithm_output_size.c b/algorithm_output_size.c index f7a0352..4457c49 100644 --- a/algorithm_output_size.c +++ b/algorithm_output_size.c @@ -8,18 +8,4 @@ * @param algorithm The hashing algorithm * @return The number of bytes in the output, zero on error */ -size_t -libsha2_algorithm_output_size(enum libsha2_algorithm algorithm) -{ - switch (algorithm) { - case LIBSHA2_224: return 28; - case LIBSHA2_256: return 32; - case LIBSHA2_384: return 48; - case LIBSHA2_512: return 64; - case LIBSHA2_512_224: return 28; - case LIBSHA2_512_256: return 32; - default: - errno = EINVAL; - return 0; - } -} +extern inline size_t libsha2_algorithm_output_size(enum libsha2_algorithm); |