aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/src/crypto.erl
diff options
context:
space:
mode:
authorMichael Loftis <[email protected]>2012-12-18 15:08:46 -0700
committerMichael Loftis <[email protected]>2012-12-18 15:08:46 -0700
commit3881407ea8444c280d9659f40e6c169a1e10310d (patch)
tree4a9fec48d16a16c9c122ad79bc743efcd5d8422a /lib/crypto/src/crypto.erl
parent70892a1e03e441b24f879a9bb5f124defbab2e16 (diff)
downloadotp-3881407ea8444c280d9659f40e6c169a1e10310d.tar.gz
otp-3881407ea8444c280d9659f40e6c169a1e10310d.tar.bz2
otp-3881407ea8444c280d9659f40e6c169a1e10310d.zip
add ripemd160 support to crypto
add ripemd160 message digest support to the crypto app, includes some test cases.
Diffstat (limited to 'lib/crypto/src/crypto.erl')
-rw-r--r--lib/crypto/src/crypto.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 461558a79e..69fecf4a11 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -25,6 +25,7 @@
-export([hash/2, hash_init/1, hash_update/2, hash_final/1]).
-export([md4/1, md4_init/0, md4_update/2, md4_final/1]).
-export([md5/1, md5_init/0, md5_update/2, md5_final/1]).
+-export([ripemd160/1, ripemd160_init/0, ripemd160_update/2, ripemd160_final/1]).
-export([sha/1, sha_init/0, sha_update/2, sha_final/1]).
-export([sha224/1, sha224_init/0, sha224_update/2, sha224_final/1]).
-export([sha256/1, sha256_init/0, sha256_update/2, sha256_final/1]).
@@ -70,6 +71,7 @@
-define(FUNC_LIST, [md4, md4_init, md4_update, md4_final,
md5, md5_init, md5_update, md5_final,
+ ripemd160, ripemd160_init, ripemd160_update, ripemd160_final,
sha, sha_init, sha_update, sha_final,
sha224, sha224_init, sha224_update, sha224_final,
sha256, sha256_init, sha256_update, sha256_final,
@@ -263,6 +265,20 @@ md4_update(_Context, _Data) -> ?nif_stub.
md4_final(_Context) -> ?nif_stub.
%%
+%% RIPEMD160
+%%
+
+-spec ripemd160(iodata()) -> binary().
+-spec ripemd160_init() -> binary().
+-spec ripemd160_update(binary(), iodata()) -> binary().
+-spec ripemd160_final(binary()) -> binary().
+
+ripemd160(_Data) -> ?nif_stub.
+ripemd160_init() -> ?nif_stub.
+ripemd160_update(_Context, _Data) -> ?nif_stub.
+ripemd160_final(_Context) -> ?nif_stub.
+
+%%
%% SHA
%%
-spec sha(iodata()) -> binary().