From 23f4db9729dbc756bd53976e6c2a742259514625 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Thu, 11 Feb 2021 22:55:18 -0500 Subject: lib: randomInt -> RandomInt --- lib/oracle.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/oracle.go b/lib/oracle.go index a8daa12..30ffe4c 100644 --- a/lib/oracle.go +++ b/lib/oracle.go @@ -14,7 +14,7 @@ dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg YnkK` var oracleKey []byte = make([]byte, 16) -var oracleRandom []byte = make([]byte, randomInt(1, 4096)) +var oracleRandom []byte = make([]byte, RandomInt(1, 4096)) func init() { _, err := rand.Read(oracleKey) @@ -76,9 +76,9 @@ func OracleAESVarEncryptECB(in []byte) []byte { } // Return a random number from range [min, max] -func randomInt(min, max int64) int64 { +func RandomInt(min, max int64) int64 { if min >= max { - panic("randomInt: min cannot be >= max!") + panic("RandomInt: min cannot be >= max!") } var rn *big.Int @@ -96,7 +96,7 @@ func randomInt(min, max int64) int64 { // Randomly generates `min` to `max` bytes. func randomBytes(min, max int64) []byte { - bs := make([]byte, randomInt(min, max)) + bs := make([]byte, RandomInt(min, max)) _, err := rand.Read(bs) if err != nil { panic(err) -- cgit v1.2.3