summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkokke <spam@rowdy.dk>2017-12-06 02:22:51 +0100
committerGitHub <noreply@github.com>2017-12-06 02:22:51 +0100
commit8526d39536cda6638d7aa17dc58b472248d79889 (patch)
treeb469914549d663ca32e1d1caa09c1afb4fc390df
parentMerge pull request #76 from sdrsdr/newapi (diff)
downloadtiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar.gz
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar.bz2
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar.lz
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar.xz
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.tar.zst
tiny-AES-c-8526d39536cda6638d7aa17dc58b472248d79889.zip
-rw-r--r--aes.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/aes.h b/aes.h
index 54d994a..39973ea 100644
--- a/aes.h
+++ b/aes.h
@@ -48,18 +48,18 @@ struct AES_ctx {
#endif
};
-void AES_init_ctx(struct AES_ctx *ctx,const uint8_t* key);
+void AES_init_ctx(struct AES_ctx* ctx, const uint8_t* key);
#if defined(CBC) && (CBC == 1)
-void AES_init_ctx_iv(struct AES_ctx *ctx,const uint8_t* key,const uint8_t* iv);
-void AES_ctx_set_iv(struct AES_ctx *ctx,const uint8_t* iv);
+void AES_init_ctx_iv(struct AES_ctx* ctx, const uint8_t* key, const uint8_t* iv);
+void AES_ctx_set_iv(struct AES_ctx* ctx, const uint8_t* iv);
#endif
#if defined(ECB) && (ECB == 1)
// buffer size is exactly AES_BLOCKLEN bytes;
// you need only AES_init_ctx as Iv is not used in ECB
// NB: ECB s considered insecure
-void AES_ECB_encrypt(struct AES_ctx *ctx, const uint8_t* buf);
-void AES_ECB_decrypt(struct AES_ctx *ctx, const uint8_t* buf);
+void AES_ECB_encrypt(struct AES_ctx* ctx, const uint8_t* buf);
+void AES_ECB_decrypt(struct AES_ctx* ctx, const uint8_t* buf);
#endif // #if defined(ECB) && (ECB == !)
@@ -69,8 +69,8 @@ void AES_ECB_decrypt(struct AES_ctx *ctx, const uint8_t* buf);
// We suggest https://en.wikipedia.org/wiki/Padding_(cryptography)#PKCS7 if you need one
// you need to set iv in ctx via AES_init_ctx_iv or AES_ctx_set_iv
// NB: no IV should ever be reused with the same key
-void AES_CBC_encrypt_buffer(struct AES_ctx *ctx, uint8_t* buf, uint32_t length);
-void AES_CBC_decrypt_buffer(struct AES_ctx *ctx, uint8_t* buf, uint32_t length);
+void AES_CBC_encrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length);
+void AES_CBC_decrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length);
#endif // #if defined(CBC) && (CBC == 1)