diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/aes.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |