slim it!
This commit is contained in:
parent
c3515a6fab
commit
3deea9a0e1
|
@ -17,8 +17,6 @@
|
|||
*)
|
||||
|
||||
|
||||
let chr x = char_of_int x
|
||||
|
||||
let and32 x n = Int32.logand x n
|
||||
let xor32 x y = Int32.logxor x y
|
||||
let or32 x y = Int32.logor x y
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
val chr : int -> char
|
||||
|
||||
val and32 : Int32.t -> Int32.t -> Int32.t
|
||||
val xor32 : Int32.t -> Int32.t -> Int32.t
|
||||
val or32 : Int32.t -> Int32.t -> Int32.t
|
||||
|
|
|
@ -31,7 +31,8 @@ let xor_strings b c =
|
|||
let int c = int_of_char c in
|
||||
String.init (String.length b)
|
||||
(fun i ->
|
||||
Bin.chr((int b.[i]) lxor (int c.[i])))
|
||||
char_of_int @@
|
||||
int b.[i] lxor int c.[i])
|
||||
|
||||
|
||||
let encrypt cbc enc p =
|
||||
|
|
Loading…
Reference in a new issue