diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2015-06-15 14:47:24 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2015-06-15 14:47:24 -0400 |
commit | 69fa341d9ba5e5d4a2ca23b69a2faba2a2e2f641 (patch) | |
tree | a718578289c4c56e14f7a8d0097e7aeba8553706 /src/hashFFI.cc | |
parent | c8e347649e6323c3eae12b6d95fcc888ba73656f (diff) |
Add SHA-2 support
Diffstat (limited to 'src/hashFFI.cc')
-rw-r--r-- | src/hashFFI.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/hashFFI.cc b/src/hashFFI.cc index dcc7375..2e7596e 100644 --- a/src/hashFFI.cc +++ b/src/hashFFI.cc @@ -87,3 +87,23 @@ uw_Basis_string uw_HashFFI_sha1(uw_context* const context, const uw_Basis_blob input) { return Hash<SHA_DIGEST_LENGTH>(context, input, SHA1); } + +uw_Basis_string uw_HashFFI_sha224(uw_context* const context, + const uw_Basis_blob input) { + return Hash<SHA224_DIGEST_LENGTH>(context, input, SHA224); +} + +uw_Basis_string uw_HashFFI_sha256(uw_context* const context, + const uw_Basis_blob input) { + return Hash<SHA256_DIGEST_LENGTH>(context, input, SHA256); +} + +uw_Basis_string uw_HashFFI_sha384(uw_context* const context, + const uw_Basis_blob input) { + return Hash<SHA384_DIGEST_LENGTH>(context, input, SHA384); +} + +uw_Basis_string uw_HashFFI_sha512(uw_context* const context, + const uw_Basis_blob input) { + return Hash<SHA512_DIGEST_LENGTH>(context, input, SHA512); +} |