summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptorFactor <raptorfactor@raptorfactor.com>2017-01-04 01:41:41 +0100
committerRaptorFactor <raptorfactor@raptorfactor.com>2017-01-04 01:41:41 +0100
commit202c3b9b4247277f5df8bfa7578569894a8312cf (patch)
tree75126c9ea851cabcbebf7ef5dafc007d043b7198
parents/strncmp/memcmp/g (diff)
downloadtiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar.gz
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar.bz2
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar.lz
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar.xz
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.tar.zst
tiny-AES-c-202c3b9b4247277f5df8bfa7578569894a8312cf.zip
-rw-r--r--aes.c6
-rw-r--r--aes.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/aes.c b/aes.c
index 38ec132..d44d281 100644
--- a/aes.c
+++ b/aes.c
@@ -434,7 +434,7 @@ static void InvCipher(void)
AddRoundKey(0);
}
-static void BlockCopy(uint8_t* output, uint8_t* input)
+static void BlockCopy(uint8_t* output, const uint8_t* input)
{
uint8_t i;
for (i=0;i<KEYLEN;++i)
@@ -451,7 +451,7 @@ static void BlockCopy(uint8_t* output, uint8_t* input)
#if defined(ECB) && ECB
-void AES128_ECB_encrypt(uint8_t* input, const uint8_t* key, uint8_t* output)
+void AES128_ECB_encrypt(const uint8_t* input, const uint8_t* key, uint8_t* output)
{
// Copy input to output, and work in-memory on output
BlockCopy(output, input);
@@ -464,7 +464,7 @@ void AES128_ECB_encrypt(uint8_t* input, const uint8_t* key, uint8_t* output)
Cipher();
}
-void AES128_ECB_decrypt(uint8_t* input, const uint8_t* key, uint8_t *output)
+void AES128_ECB_decrypt(const uint8_t* input, const uint8_t* key, uint8_t *output)
{
// Copy input to output, and work in-memory on output
BlockCopy(output, input);
diff --git a/aes.h b/aes.h
index 708a09c..e86ab7f 100644
--- a/aes.h
+++ b/aes.h
@@ -22,8 +22,8 @@
#if defined(ECB) && ECB
-void AES128_ECB_encrypt(uint8_t* input, const uint8_t* key, uint8_t *output);
-void AES128_ECB_decrypt(uint8_t* input, const uint8_t* key, uint8_t *output);
+void AES128_ECB_encrypt(const uint8_t* input, const uint8_t* key, uint8_t *output);
+void AES128_ECB_decrypt(const uint8_t* input, const uint8_t* key, uint8_t *output);
#endif // #if defined(ECB) && ECB