summaryrefslogtreecommitdiffstats
path: root/challenge/c03.go
diff options
context:
space:
mode:
Diffstat (limited to 'challenge/c03.go')
-rw-r--r--challenge/c03.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/challenge/c03.go b/challenge/c03.go
new file mode 100644
index 0000000..019aaff
--- /dev/null
+++ b/challenge/c03.go
@@ -0,0 +1,17 @@
+// Copyright © 2020 rsiddharth <s@ricketyspace.net>
+// SPDX-License-Identifier: ISC
+
+package challenge
+
+import (
+ "fmt"
+ "ricketyspace.net/cryptopals/lib"
+)
+
+func C3() {
+ hs := "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"
+ k, ds, scr := lib.XORCrackSingleKey(hs)
+
+ fmt.Printf("Key is '%c' (Score: %v)\n", k, scr)
+ fmt.Printf("Decrypted string: %v\n", ds)
+}