From 45cdd598ca0938ae5c85ce469302e7907e719cf8 Mon Sep 17 00:00:00 2001 From: tjeerd Date: Fri, 28 Nov 2014 16:14:04 +0100 Subject: [PATCH 1/2] Solved deprecated function for R16 and higher --- src/cutkey.erl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cutkey.erl b/src/cutkey.erl index af292d7..f5a38aa 100644 --- a/src/cutkey.erl +++ b/src/cutkey.erl @@ -68,7 +68,12 @@ rsa(Bits, E, Opts) when is_integer(Bits), Bits > 0, E band 1 =:= 1 -> false -> erlang:error(badarg) end. -erlint(MPInts) -> [ crypto:erlint(X) || X <- MPInts ]. +erlint(MPInts) when is_list(WPInts) -> [ erlint(X) || X <- MPInts ]. + +erlint(<>) -> + Bits= MPIntSize * 8, + <> = MPIntValue, + Integer. -ifdef(TEST). From 67375ea3d2ee3c729bc9a93baca447203930fd12 Mon Sep 17 00:00:00 2001 From: tjeerd Date: Fri, 28 Nov 2014 16:20:49 +0100 Subject: [PATCH 2/2] Solved deprecated function for R16 and higher --- src/cutkey.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cutkey.erl b/src/cutkey.erl index f5a38aa..87732bf 100644 --- a/src/cutkey.erl +++ b/src/cutkey.erl @@ -68,7 +68,7 @@ rsa(Bits, E, Opts) when is_integer(Bits), Bits > 0, E band 1 =:= 1 -> false -> erlang:error(badarg) end. -erlint(MPInts) when is_list(WPInts) -> [ erlint(X) || X <- MPInts ]. +erlint(MPInts) when is_list(MPInts) -> [ erlint(X) || X <- MPInts ]; erlint(<>) -> Bits= MPIntSize * 8,