summaryrefslogtreecommitdiffstats
path: root/lib/aes.go
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2020-12-09 20:08:02 -0500
committerrsiddharth <s@ricketyspace.net>2020-12-09 20:08:02 -0500
commit0afdf0f2d20aa22baacfc8c75d0004a0dd3d09d4 (patch)
tree50e4d21983ea5e52f50f79f72ebc1ece2aae8df6 /lib/aes.go
parent5d9cd625fef67d7a6ec751147028c12f938dfdb7 (diff)
lib/aes: update AESEncrryptECB
Change argument name `cipher` to `plain`.
Diffstat (limited to 'lib/aes.go')
-rw-r--r--lib/aes.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/aes.go b/lib/aes.go
index 44f2350..b00e0b8 100644
--- a/lib/aes.go
+++ b/lib/aes.go
@@ -36,15 +36,15 @@ func AESDecryptCBC(cipher, key, iv []byte) []byte {
return output
}
-func AESEncryptECB(cipher, key []byte) []byte {
- iter := len(cipher) / 16
+func AESEncryptECB(plain, key []byte) []byte {
+ iter := len(plain) / 16
// Encrypt 16 bytes at a time.
output := make([]byte, 0)
for i := 0; i < iter; i++ {
s := (i * 16)
e := (i * 16) + 16
- output = append(output, aesCipher(cipher[s:e], key)...)
+ output = append(output, aesCipher(plain[s:e], key)...)
}
return output