From cc12de37f71f35d496e8b3fdbfbac431a970c8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reynir=20Bj=C3=B6rnsson?= Date: Fri, 7 Sep 2018 11:59:19 +0200 Subject: [PATCH] Aliasing (^) is unnecessary. --- twofish/primitives.ml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/twofish/primitives.ml b/twofish/primitives.ml index c6ed5c3..2228dab 100644 --- a/twofish/primitives.ml +++ b/twofish/primitives.ml @@ -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