Aliasing (^) is unnecessary.
This commit is contained in:
parent
544969ce97
commit
cc12de37f7
|
@ -25,9 +25,6 @@ open Bin
|
|||
let ( << ) x y = left32 x y ;;
|
||||
let ( >> ) x y = right32 x y ;;
|
||||
|
||||
(* ^ is more useful as a 32-bit XOR than it is as a string-concat *)
|
||||
let ( ^^ ) = ( ^ ) ;;
|
||||
|
||||
type ctx = {
|
||||
k : Int32.t array;
|
||||
s : Int32.t array array; (* s-boxes *)
|
||||
|
@ -273,8 +270,8 @@ let ord32 c = Int32.of_int (ord c)
|
|||
let unpack_longs s n =
|
||||
let slen = String.length s in
|
||||
if (slen/4) < n then
|
||||
failwith ("unpack_longs: asked to unpack "^^(string_of_int n)^^" longs from
|
||||
string length "^^(string_of_int slen))
|
||||
failwith ("unpack_longs: asked to unpack "^(string_of_int n)^" longs from
|
||||
string length "^(string_of_int slen))
|
||||
else
|
||||
let rec unpack_long i accum =
|
||||
if i == n then
|
||||
|
@ -357,7 +354,7 @@ let mds_rem a b =
|
|||
let init key =
|
||||
let keylength = String.length key in
|
||||
if keylength != 32 then
|
||||
failwith ("init: key length must be 32, got key length "^^string_of_int (keylength))
|
||||
failwith ("init: key length must be 32, got key length "^string_of_int (keylength))
|
||||
else
|
||||
let le_longs = unpack_longs key 8 in
|
||||
|
||||
|
|
Loading…
Reference in a new issue