summaryrefslogtreecommitdiffstats
path: root/challenge
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2021-02-24 18:23:17 -0500
committerrsiddharth <s@ricketyspace.net>2021-02-24 18:23:17 -0500
commit3d5ecc3132577308636bea80922c74505eec93f0 (patch)
tree3abe10443b27d7ea116cb4cb3be88ebe08315617 /challenge
parentd8272421760fd310f1f2e237f5c5d48952d3a4ef (diff)
lib: RandomKey -> RandomBytes
Diffstat (limited to 'challenge')
-rw-r--r--challenge/c17.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge/c17.go b/challenge/c17.go
index 78c949c..2ebc583 100644
--- a/challenge/c17.go
+++ b/challenge/c17.go
@@ -11,7 +11,7 @@ import (
// Cryptopals #17 - CBC padding oracle attack
func C17() {
- key, err := lib.RandomKey(16)
+ key, err := lib.RandomBytes(16)
if err != nil {
fmt.Printf("key generation: error: %v\n", err)
}
@@ -31,7 +31,7 @@ func C17() {
r := lib.RandomInt(0, int64(len(cookies)-1))
p := lib.Base64ToBytes(cookies[r])
k := key
- iv, err := lib.RandomKey(16)
+ iv, err := lib.RandomBytes(16)
if err != nil {
fmt.Printf("iv generation: error: %v\n", err)
}