diff options
author | siddharth <s@ricketyspace.net> | 2021-09-12 14:02:44 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2021-09-12 14:02:44 -0400 |
commit | 42595ef565e1d71c37d72748756cb6957495cad3 (patch) | |
tree | f2b5d12d647e0cdd840ddfabea5e9ae15a89ff21 /lib | |
parent | 488382619eeeaf4836dbece9a397eff4b9329c76 (diff) |
lib: aesCipher -> AESCipher
Diffstat (limited to 'lib')
-rw-r--r-- | lib/aes.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |