diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-24 11:52:30 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-24 11:52:30 +0200 |
commit | ba0bbce290c3742843fb2e8a693d9060e71eeefb (patch) | |
tree | 83950d23e99a4ecaac2801ffedf87e52e3d77007 /libhashsum_init_hasher.c | |
parent | Add libhashsum_hasher.algorithm_string (diff) | |
download | libhashsum-ba0bbce290c3742843fb2e8a693d9060e71eeefb.tar.gz libhashsum-ba0bbce290c3742843fb2e8a693d9060e71eeefb.tar.bz2 libhashsum-ba0bbce290c3742843fb2e8a693d9060e71eeefb.tar.xz |
Add libhashsum_init_hasher_from_string + m
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libhashsum_init_hasher.c')
-rw-r--r-- | libhashsum_init_hasher.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libhashsum_init_hasher.c b/libhashsum_init_hasher.c index d747e52..3f99e6c 100644 --- a/libhashsum_init_hasher.c +++ b/libhashsum_init_hasher.c @@ -3,39 +3,39 @@ int -libhashsum_init_hasher(struct libhashsum_hasher *hasher, enum libhashsum_algorithm algorithm) +libhashsum_init_hasher(struct libhashsum_hasher *this, enum libhashsum_algorithm algorithm) { switch (algorithm) { case LIBHASHSUM_MD2: - return libhashsum_init_md2_hasher(hasher); + return libhashsum_init_md2_hasher(this); case LIBHASHSUM_MD4: - return libhashsum_init_md4_hasher(hasher); + return libhashsum_init_md4_hasher(this); case LIBHASHSUM_MD5: - return libhashsum_init_md5_hasher(hasher); + return libhashsum_init_md5_hasher(this); case LIBHASHSUM_RIPEMD_128: - return libhashsum_init_ripemd_128_hasher(hasher); + return libhashsum_init_ripemd_128_hasher(this); case LIBHASHSUM_RIPEMD_160: - return libhashsum_init_ripemd_160_hasher(hasher); + return libhashsum_init_ripemd_160_hasher(this); case LIBHASHSUM_RIPEMD_256: - return libhashsum_init_ripemd_256_hasher(hasher); + return libhashsum_init_ripemd_256_hasher(this); case LIBHASHSUM_RIPEMD_320: - return libhashsum_init_ripemd_320_hasher(hasher); + return libhashsum_init_ripemd_320_hasher(this); case LIBHASHSUM_SHA0: - return libhashsum_init_sha0_hasher(hasher); + return libhashsum_init_sha0_hasher(this); case LIBHASHSUM_SHA1: - return libhashsum_init_sha1_hasher(hasher); + return libhashsum_init_sha1_hasher(this); case LIBHASHSUM_SHA_224: - return libhashsum_init_sha_224_hasher(hasher); + return libhashsum_init_sha_224_hasher(this); case LIBHASHSUM_SHA_256: - return libhashsum_init_sha_256_hasher(hasher); + return libhashsum_init_sha_256_hasher(this); case LIBHASHSUM_SHA_384: - return libhashsum_init_sha_384_hasher(hasher); + return libhashsum_init_sha_384_hasher(this); case LIBHASHSUM_SHA_512: - return libhashsum_init_sha_512_hasher(hasher); + return libhashsum_init_sha_512_hasher(this); case LIBHASHSUM_SHA_512_224: - return libhashsum_init_sha_512_224_hasher(hasher); + return libhashsum_init_sha_512_224_hasher(this); case LIBHASHSUM_SHA_512_256: - return libhashsum_init_sha_512_256_hasher(hasher); + return libhashsum_init_sha_512_256_hasher(this); default: errno = EINVAL; return -1; |