From 9db1426878ff5b81f66d6d73bf69555eb8e5b5d2 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 29 Aug 2020 13:30:47 -0400 Subject: challenge: do challenge 2 * challenge/c02.go: Challenge 2 snafu. * cryptopals.go: Add challenge 2. * enc/hex.go (DecToHexChar): New function. * enc/xor.go (FixedXOR): New function. --- challenge/c02.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 challenge/c02.go (limited to 'challenge') diff --git a/challenge/c02.go b/challenge/c02.go new file mode 100644 index 0000000..deab152 --- /dev/null +++ b/challenge/c02.go @@ -0,0 +1,14 @@ +package challenge + +import ( + "fmt" + "ricketyspace.net/cryptopals/enc" +) + +func C2() { + a := "1c0111001f010100061a024b53535009181c" + b := "686974207468652062756c6c277320657965" + c := enc.FixedXOR(a, b) + + fmt.Printf("XOR(%v ^ %v) = %v\n", a, b, c) +} -- cgit v1.2.3