diff options
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/src/crypto.erl | 2 | ||||
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index 8c61084f3e..4cfa8415b4 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -1489,7 +1489,7 @@ ecdh_compute_key_nif(_Others, _My) -> ?nif_stub. ec_key_to_term(Key) -> case ec_key_to_term_nif(Key) of {PrivKey, PubKey} -> - {bin_to_int(PrivKey), PubKey}; + {PubKey, bin_to_int(PrivKey)}; _ -> erlang:error(conversion_failed) end. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 57f5696d3c..1812c98dff 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -1887,7 +1887,7 @@ ec(Config) when is_list(Config) -> ec_do() -> %% test for a name curve - {D2_priv, D2_pub} = crypto:generate_key(ecdh, sect113r2), + {D2_pub, D2_priv} = crypto:generate_key(ecdh, sect113r2), PrivECDH = [D2_priv, sect113r2], PubECDH = [D2_pub, sect113r2], %%TODO: find a published test case for a EC key |