diff options
-rw-r--r-- | challenge/c08.go | 2 | ||||
-rw-r--r-- | lib/blocks.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/challenge/c08.go b/challenge/c08.go index 1f43b45..bd1a934 100644 --- a/challenge/c08.go +++ b/challenge/c08.go @@ -12,7 +12,7 @@ func C8() { for i := 0; i < len(c08); i++ { bs := lib.HexStrToBytes(c08[i]) - block := lib.BlockIsECB(bs) + block := lib.CipherIsECB(bs) if block != nil { fmt.Printf("Cipher at line %d (%s)", i+1, c08[i]) fmt.Printf(" might be AES encrypted in ECB mode.\n") diff --git a/lib/blocks.go b/lib/blocks.go index 0645fab..4dbd365 100644 --- a/lib/blocks.go +++ b/lib/blocks.go @@ -61,7 +61,7 @@ func BlocksEqual(a, b []byte) bool { return true } -func BlockIsECB(bs []byte) []byte { +func CipherIsECB(bs []byte) []byte { blocks := BreakIntoBlocks(bs, 16) for i := 0; i < len(blocks); i++ { |