diff options
author | rsiddharth <s@ricketyspace.net> | 2021-02-24 20:09:26 -0500 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2021-02-24 20:09:26 -0500 |
commit | c35eb556136a35a5aa1f4e9371428a4c4cb7fdbd (patch) | |
tree | ffb441da6d24f5f9533576dd834c8ebab35ebdd9 /lib/oracle.go | |
parent | 6c4749a903744a16deb2fa6c426c4193afe76b4c (diff) |
lib: remove oracle.go
Move functions into C12 and C14 where they're used.
Diffstat (limited to 'lib/oracle.go')
-rw-r--r-- | lib/oracle.go | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/oracle.go b/lib/oracle.go deleted file mode 100644 index 8a449a1..0000000 --- a/lib/oracle.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright © 2020 rsiddharth <s@ricketyspace.net> -// SPDX-License-Identifier: ISC - -package lib - -var oracleUnknown string = `Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkg -aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyBvbiBzdGFuZGJ5IHdhdmluZyBq -dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg -YnkK` - -var oracleKey []byte -var oracleRandom []byte - -func init() { - var err error - - oracleKey, err = RandomBytes(16) - if err != nil { - panic(err) - } - - oracleRandom, err = RandomBytes(int(RandomInt(1, 4096))) - if err != nil { - panic(err) - } -} - -func OracleAESEncryptECB(in []byte) []byte { - 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) -} |