summaryrefslogtreecommitdiffstats
path: root/lib/oracle.go
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 /lib/oracle.go
parentd8272421760fd310f1f2e237f5c5d48952d3a4ef (diff)
lib: RandomKey -> RandomBytes
Diffstat (limited to 'lib/oracle.go')
-rw-r--r--lib/oracle.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oracle.go b/lib/oracle.go
index e2ee5fe..4def7e2 100644
--- a/lib/oracle.go
+++ b/lib/oracle.go
@@ -14,12 +14,12 @@ var oracleRandom []byte
func init() {
var err error
- oracleKey, err = RandomKey(16)
+ oracleKey, err = RandomBytes(16)
if err != nil {
panic(err)
}
- oracleRandom, err = RandomKey(int(RandomInt(1, 4096)))
+ oracleRandom, err = RandomBytes(int(RandomInt(1, 4096)))
if err != nil {
panic(err)
}
@@ -30,12 +30,12 @@ func init() {
// cipher.
func OracleAESRandomEncrypt(in []byte) []byte {
// Generate random key.
- key, err := RandomKey(16)
+ key, err := RandomBytes(16)
if err != nil {
panic(err)
}
// Generate random initialization vector; needed for AES CBC.
- iv, err := RandomKey(16)
+ iv, err := RandomBytes(16)
if err != nil {
panic(err)
}