summaryrefslogtreecommitdiffstats
path: root/lib/oracle.go
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2021-02-11 22:56:27 -0500
committerrsiddharth <s@ricketyspace.net>2021-02-11 22:56:27 -0500
commit3217e3fbad29188009cb6df88d2db6792b8aa109 (patch)
tree1b5d1b27690c4d5cba24dcf5cb4740b8a0f42729 /lib/oracle.go
parent23f4db9729dbc756bd53976e6c2a742259514625 (diff)
lib: oracleKey -> OracleKey
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 30ffe4c..11f735a 100644
--- a/lib/oracle.go
+++ b/lib/oracle.go
@@ -13,11 +13,11 @@ aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyBvbiBzdGFuZGJ5IHdhdmluZyBq
dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg
YnkK`
-var oracleKey []byte = make([]byte, 16)
+var OracleKey []byte = make([]byte, 16)
var oracleRandom []byte = make([]byte, RandomInt(1, 4096))
func init() {
- _, err := rand.Read(oracleKey)
+ _, err := rand.Read(OracleKey)
if err != nil {
panic(err)
}
@@ -66,13 +66,13 @@ func OracleAESRandomEncrypt(in []byte) []byte {
}
func OracleAESEncryptECB(in []byte) []byte {
- return AESEncryptECB(append(in, Base64ToBytes(oracleUnknown)...), oracleKey)
+ return AESEncryptECB(append(in, Base64ToBytes(oracleUnknown)...), OracleKey)
}
func OracleAESVarEncryptECB(in []byte) []byte {
in = append(oracleRandom, in...)
in = append(in, Base64ToBytes(oracleUnknown)...)
- return AESEncryptECB(in, oracleKey)
+ return AESEncryptECB(in, OracleKey)
}
// Return a random number from range [min, max]