aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/test/crypto_SUITE.erl
diff options
context:
space:
mode:
authorMichael Loftis <[email protected]>2012-12-21 11:21:52 -0700
committerMichael Loftis <[email protected]>2012-12-21 11:21:52 -0700
commit1ba013ffcc5efd75869088161f33a09305653fb9 (patch)
tree3cea588551fb9730480aa4ed609baa1f5c99f23a /lib/crypto/test/crypto_SUITE.erl
parentf33c0a7aaf5c051c6328451c3ebfd9936273be90 (diff)
downloadotp-1ba013ffcc5efd75869088161f33a09305653fb9.tar.gz
otp-1ba013ffcc5efd75869088161f33a09305653fb9.tar.bz2
otp-1ba013ffcc5efd75869088161f33a09305653fb9.zip
fix crypto ripemd160 tests to use hash_init family
this updates the previous patch adding tests for the ripemd160 functions to use the hash and hash_init family instead of calling directly.
Diffstat (limited to 'lib/crypto/test/crypto_SUITE.erl')
-rw-r--r--lib/crypto/test/crypto_SUITE.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index 829d867d8c..019f5f9d83 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -728,9 +728,9 @@ ripemd160(doc) ->
ripemd160(suite) ->
[];
ripemd160(Config) when is_list(Config) ->
- ?line m(crypto:ripemd160("abc"),
+ ?line m(crypto:hash(ripemd160,"abc"),
hexstr2bin("8EB208F7E05D987A9B044A8E98C6B087F15A0BFC")),
- ?line m(crypto:ripemd160("abcdbcdecdefdefgefghfghighijhijkijkljklmklm"
+ ?line m(crypto:hash(ripemd160,"abcdbcdecdefdefgefghfghighijhijkijkljklmklm"
"nlmnomnopnopq"),
hexstr2bin("12A053384A9C0C88E405A06C27DCF49ADA62EB2B")).
@@ -743,10 +743,10 @@ ripemd160_update(doc) ->
ripemd160_update(suite) ->
[];
ripemd160_update(Config) when is_list(Config) ->
- ?line Ctx = crypto:ripemd160_init(),
- ?line Ctx1 = crypto:ripemd160_update(Ctx, "abcdbcdecdefdefgefghfghighi"),
- ?line Ctx2 = crypto:ripemd160_update(Ctx1, "jhijkijkljklmklmnlmnomnopnopq"),
- ?line m(crypto:ripemd160_final(Ctx2),
+ ?line Ctx = crypto:hash_init(ripemd160),
+ ?line Ctx1 = crypto:hash_update(Ctx, "abcdbcdecdefdefgefghfghighi"),
+ ?line Ctx2 = crypto:hash_update(Ctx1, "jhijkijkljklmklmnlmnomnopnopq"),
+ ?line m(crypto:hash_final(Ctx2),
hexstr2bin("12A053384A9C0C88E405A06C27DCF49ADA62EB2B")).
%%