Skip to content

Commit ad51d26

Browse files
tverlaanbearice
authored andcommitted
import bitwise instead of use
warning: ^^^ is deprecated. It is typically used as xor but it has the wrong precedence, use Bitwise.bxor/2 instead lib/radius/util.ex:52:11 warning: use Bitwise is deprecated. import Bitwise instead lib/radius/util.ex:4: Radius.Util
1 parent 5389509 commit ad51d26

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/radius/util.ex

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
defmodule Radius.Util do
22
require Logger
3-
4-
use Bitwise
3+
import Bitwise
54

65
def encrypt_rfc2865(passwd, secret, auth) do
76
passwd
@@ -49,7 +48,7 @@ defmodule Radius.Util do
4948
s = byte_size(x) * 8
5049
<<x::size(s)>> = x
5150
<<y::size(s)>> = y
52-
z = x ^^^ y
51+
z = bxor(x, y)
5352
<<z::size(s)>>
5453
end
5554

0 commit comments

Comments
 (0)