From 16d06da9fb425fe652f3826275f3f9bf87c881f0 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Thu, 16 May 2013 20:04:24 +0200 Subject: crypto,ssh, netconf, inets: binary_to_integer -> bytes_to_integer --- lib/inets/test/erl_make_certs.erl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/inets/test/erl_make_certs.erl') diff --git a/lib/inets/test/erl_make_certs.erl b/lib/inets/test/erl_make_certs.erl index be1253bfb8..4ca2907a73 100644 --- a/lib/inets/test/erl_make_certs.erl +++ b/lib/inets/test/erl_make_certs.erl @@ -398,17 +398,13 @@ gen_dsa2(LSize, NSize) -> Y = crypto:mod_pow(G, X, P), %% Calculate y = g^x mod p. #'DSAPrivateKey'{version=0, p = P, q = Q, - g = crypto:binary_to_integer(G), y = crypto:binary_to_integer(Y), x = X} + g = crypto:bytes_to_integer(G), y = crypto:bytes_to_integer(Y), x = X} end. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% EC key generation (OBS: for testing only) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -int2list(I) -> - L = (length(integer_to_list(I, 16)) + 1) div 2, - binary_to_list(<>). - gen_ec2(CurveId) -> {PrivKey, PubKey} = crypto:generate_key(ecdh, CurveId), @@ -446,7 +442,7 @@ is_prime(_, 0) -> true; is_prime(Candidate, Test) -> CoPrime = odd_rand(10000, Candidate), Result = crypto:mod_pow(CoPrime, Candidate, Candidate) , - is_prime(CoPrime, crypto:binary_to_integer(Result), Candidate, Test). + is_prime(CoPrime, crypto:bytes_to_integer(Result), Candidate, Test). is_prime(CoPrime, CoPrime, Candidate, Test) -> is_prime(Candidate, Test-1); -- cgit v1.2.3