summaryrefslogtreecommitdiffstats
path: root/challenge/c05.go
diff options
context:
space:
mode:
Diffstat (limited to 'challenge/c05.go')
-rw-r--r--challenge/c05.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/challenge/c05.go b/challenge/c05.go
new file mode 100644
index 0000000..7f22663
--- /dev/null
+++ b/challenge/c05.go
@@ -0,0 +1,21 @@
+// Copyright © 2020 rsiddharth <s@ricketyspace.net>
+// SPDX-License-Identifier: ISC
+
+package challenge
+
+import (
+ "fmt"
+ "ricketyspace.net/cryptopals/lib"
+)
+
+var icebaby string = `Burning 'em, if you ain't quick and nimble
+I go crazy when I hear a cymbal`
+
+var key string = "ICE"
+
+func C5() {
+ es := lib.RepeatingXOR(icebaby, key)
+ hs := lib.BytesToHexStr([]byte(es))
+
+ fmt.Printf("RepeatingXOR('%v', '%v') = %v\n", icebaby, key, hs)
+}