summaryrefslogtreecommitdiffstats
path: root/lib/aes.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-09-12 14:02:44 -0400
committersiddharth <s@ricketyspace.net>2021-09-12 14:02:44 -0400
commit42595ef565e1d71c37d72748756cb6957495cad3 (patch)
treef2b5d12d647e0cdd840ddfabea5e9ae15a89ff21 /lib/aes.go
parent488382619eeeaf4836dbece9a397eff4b9329c76 (diff)
lib: aesCipher -> AESCipher
Diffstat (limited to 'lib/aes.go')
-rw-r--r--lib/aes.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/aes.go b/lib/aes.go
index f3fd6d9..fd570fa 100644
--- a/lib/aes.go
+++ b/lib/aes.go
@@ -57,7 +57,7 @@ func aesCipherCTR(in, key []byte, ctrFunc func() []byte) ([]byte, error) {
e = len(in)
}
c := in[s:e]
- output = append(output, FixedXORBytes(aesCipher(ib, key)[0:len(c)], c)...)
+ output = append(output, FixedXORBytes(AESCipher(ib, key)[0:len(c)], c)...)
}
return output, nil
}
@@ -74,7 +74,7 @@ func AESEncryptCBC(plain, key, iv []byte) []byte {
s := (i * 16)
e := (i * 16) + 16
p := plain[s:e]
- c := aesCipher(FixedXORBytes(p, lc), key)
+ c := AESCipher(FixedXORBytes(p, lc), key)
output = append(output, c...)
lc = c
@@ -113,7 +113,7 @@ func AESEncryptECB(plain, key []byte) []byte {
for i := 0; i < iter; i++ {
s := (i * 16)
e := (i * 16) + 16
- output = append(output, aesCipher(plain[s:e], key)...)
+ output = append(output, AESCipher(plain[s:e], key)...)
}
return output
@@ -136,7 +136,7 @@ func AESDecryptECB(cipher, key []byte) []byte {
return output
}
-func aesCipher(in, ky []byte) []byte {
+func AESCipher(in, ky []byte) []byte {
nb := 4
nr := 10