aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_ssl3.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-04-18 10:47:52 +0200
committerIngela Anderton Andin <[email protected]>2013-05-08 10:39:18 +0200
commitd565a551ff2605c8abca0009ab90fbb7687a4097 (patch)
treeac5eb32465c5b1d273fbb66bcd18d066eadc7792 /lib/ssl/src/ssl_ssl3.erl
parent7030e089d1090e3b9a95c96737b36d6d6fc6ef97 (diff)
downloadotp-d565a551ff2605c8abca0009ab90fbb7687a4097.tar.gz
otp-d565a551ff2605c8abca0009ab90fbb7687a4097.tar.bz2
otp-d565a551ff2605c8abca0009ab90fbb7687a4097.zip
ssl: Make better use of the crypto API
Use the functions in crypto that we want to keep in the API.
Diffstat (limited to 'lib/ssl/src/ssl_ssl3.erl')
-rw-r--r--lib/ssl/src/ssl_ssl3.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ssl/src/ssl_ssl3.erl b/lib/ssl/src/ssl_ssl3.erl
index a11c5b8c0c..013c27ebb5 100644
--- a/lib/ssl/src/ssl_ssl3.erl
+++ b/lib/ssl/src/ssl_ssl3.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -154,9 +154,9 @@ suites() ->
%%--------------------------------------------------------------------
hash(?MD5, Data) ->
- crypto:md5(Data);
+ crypto:hash(md5, Data);
hash(?SHA, Data) ->
- crypto:sha(Data).
+ crypto:hash(sha, Data).
%%pad_1(?NULL) ->
%% "";
@@ -198,6 +198,6 @@ gen(_Secret, _All, Wanted, Len, _C, _N, Acc) when Wanted =< Len ->
Block;
gen(Secret, All, Wanted, Len, C, N, Acc) ->
Prefix = lists:duplicate(N, C),
- SHA = crypto:sha([Prefix, All]),
- MD5 = crypto:md5([Secret, SHA]),
+ SHA = crypto:hash(sha, [Prefix, All]),
+ MD5 = crypto:hash(md5, [Secret, SHA]),
gen(Secret, All, Wanted, Len + 16, C+1, N+1, [MD5 | Acc]).