summaryrefslogtreecommitdiffstats
path: root/challenge/c24.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-09-04 18:59:57 -0400
committersiddharth <s@ricketyspace.net>2021-09-04 18:59:57 -0400
commit3bbee6720b9fca81817289fe0e1fe830476cf600 (patch)
tree05dde2cc2c9ef3570c9f3bb4e3f8b1bf73231522 /challenge/c24.go
parent80f9ee3bc916c63a9bd54e0b0eadf95a7d86836b (diff)
challenge: C24: fix if block
Diffstat (limited to 'challenge/c24.go')
-rw-r--r--challenge/c24.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge/c24.go b/challenge/c24.go
index 4658557..d60036b 100644
--- a/challenge/c24.go
+++ b/challenge/c24.go
@@ -40,7 +40,7 @@ func C24() {
) // Plaintext; last 14 characters known.
cipher := lib.MTXORStream(plain, seed) // Encrypt plaintext.
cseed := crack(cipher) // Try to crack seed
- if lib.BytesEqual(cseed, seed) {
+ if !lib.BytesEqual(cseed, seed) {
panic(fmt.Errorf("Unable to crack 16-bit seed %v != %v\n", cseed, seed))
}
fmt.Printf("Cracked 16-bit seed %v == %v\n", cseed, seed)