summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2019-02-22 09:25:36 +0100
committerGitHub <noreply@github.com>2019-02-22 09:25:36 +0100
commitca85e00de963102d3999ea5fa865c0deff6370d3 (patch)
tree8215473e6596f05f965aa5fcafb23fd70a028f77
parentMerge pull request #126 from torfinnberset/master (diff)
downloadtiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar.gz
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar.bz2
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar.lz
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar.xz
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.tar.zst
tiny-AES-c-ca85e00de963102d3999ea5fa865c0deff6370d3.zip
-rw-r--r--aes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/aes.c b/aes.c
index 776259c..313ff71 100644
--- a/aes.c
+++ b/aes.c
@@ -466,7 +466,7 @@ static void InvCipher(state_t* state, const uint8_t* RoundKey)
#if defined(ECB) && (ECB == 1)
-void AES_ECB_encrypt(const struct AES_ctx *ctx, uint8_t* buf)
+void AES_ECB_encrypt(const struct AES_ctx* ctx, uint8_t* buf)
{
// The next function call encrypts the PlainText with the Key using AES algorithm.
Cipher((state_t*)buf, ctx->RoundKey);
@@ -552,9 +552,9 @@ void AES_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length)
/* Increment Iv and handle overflow */
for (bi = (AES_BLOCKLEN - 1); bi >= 0; --bi)
{
- /* inc will overflow */
+ /* inc will overflow */
if (ctx->Iv[bi] == 255)
- {
+ {
ctx->Iv[bi] = 0;
continue;
}