implemented sha2_hasher which supports SHA-256, SHA-384 and SHA-512

This commit is contained in:
Martin Willi
2006-09-19 14:49:47 +00:00
parent 462129d332
commit e698dc4559
7 changed files with 741 additions and 50 deletions
@@ -25,6 +25,7 @@
#include "hasher.h"
#include <crypto/hashers/sha1_hasher.h>
#include <crypto/hashers/sha2_hasher.h>
#include <crypto/hashers/md5_hasher.h>
/**
@@ -51,6 +52,12 @@ hasher_t *hasher_create(hash_algorithm_t hash_algorithm)
{
return (hasher_t*)sha1_hasher_create();
}
case HASH_SHA256:
case HASH_SHA384:
case HASH_SHA512:
{
return (hasher_t*)sha2_hasher_create(hash_algorithm);
}
case HASH_MD5:
{
return (hasher_t*)md5_hasher_create();