upstream: https://github.com/mirage/mirage-crypto
at main 21 lines 562 B view raw
1open OUnit2 2open Crypto 3open Test_common 4 5(* Xor *) 6 7let xor_cases = 8 cases_of 9 (f2_eq ~msg:"xor" Uncommon.xor) 10 [ 11 ( "00 01 02 03 04 05 06 07 08 09 0a 0b 0c", 12 "0c 0b 0a 09 08 07 06 05 04 03 02 01 00", 13 "0c 0a 08 0a 0c 02 00 02 0c 0a 08 0a 0c" ); 14 ( "00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f", 15 "0f 0e 0d 0c 0b 0a 09 08 07 06 05 04 03 02 01 00", 16 "0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f 0f" ); 17 ("00", "00", "00"); 18 ("", "", ""); 19 ] 20 21let suite = [ "XOR" >::: [ "example" >::: xor_cases ] ]