aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-04-24 15:20:05 +0200
committerIngela Anderton Andin <[email protected]>2013-05-08 10:39:20 +0200
commita37196319f7e62a47b43a0dc939505eede616299 (patch)
tree3d1f45625e4b79fca65747d1a3c12e002fe59638 /lib
parent12e72ac76d2f94fd78beeb58f27105d8007cdeb0 (diff)
downloadotp-a37196319f7e62a47b43a0dc939505eede616299.tar.gz
otp-a37196319f7e62a47b43a0dc939505eede616299.tar.bz2
otp-a37196319f7e62a47b43a0dc939505eede616299.zip
crypto: Change ecdh_compute_key to have 3 arguments
Diffstat (limited to 'lib')
-rw-r--r--lib/crypto/src/crypto.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 999a65042d..894253f84d 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -67,7 +67,7 @@
-export([aes_cbc_ivec/1]).
-export([aes_ctr_encrypt/3, aes_ctr_decrypt/3]).
-export([aes_ctr_stream_init/2, aes_ctr_stream_encrypt/2, aes_ctr_stream_decrypt/2]).
--export([ecdh_generate_key/1, ecdh_compute_key/2]).
+-export([ecdh_generate_key/1, ecdh_compute_key/3]).
-export([sign/4, verify/5]).
-export([dh_generate_parameters/2, dh_check/1]). %% Testing see below
@@ -1267,9 +1267,9 @@ term_to_ec_key({Curve, PrivKey, PubKey}) ->
term_to_ec_key_nif(_Curve, _PrivKey, _PubKey) -> ?nif_stub.
--spec ecdh_compute_key(ec_point(), ec_key_res()) -> binary().
-ecdh_compute_key(Others, My) ->
- ecdh_compute_key_nif(Others, term_to_ec_key(My)).
+-spec ecdh_compute_key(ec_point(), binary(), ec_curve()) -> binary().
+ecdh_compute_key(Others, My, Curve) ->
+ ecdh_compute_key_nif(Others, term_to_ec_key({Curve,My,undefined})).
ecdh_compute_key_nif(_Others, _My) -> ?nif_stub.