diff options
author | Stoian Ivanov <s.ivanov@teracomm.bg> | 2017-12-05 13:27:53 +0100 |
---|---|---|
committer | Stoian Ivanov <s.ivanov@teracomm.bg> | 2017-12-05 13:29:19 +0100 |
commit | 1e86fddb216b05b3de59bb59db5808f0a0861466 (patch) | |
tree | 4e4b2ab4ed567b048a65100bfb5ddd94bfa2544c /aes.h | |
parent | make thead safe via context pram; remove padding as non working; opitmise abit (diff) | |
download | tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar.gz tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar.bz2 tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar.lz tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar.xz tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.tar.zst tiny-AES-c-1e86fddb216b05b3de59bb59db5808f0a0861466.zip |
Diffstat (limited to '')
-rw-r--r-- | aes.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -58,8 +58,8 @@ void AES_ctx_set_iv(struct AES_ctx *ctx,const uint8_t* iv); // 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* input, uint8_t *output); -void AES_ECB_decrypt(struct AES_ctx *ctx, const uint8_t* input, uint8_t *output); +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* input, uint8_t *output) // 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* output, uint8_t* input, uint32_t length); -void AES_CBC_decrypt_buffer(struct AES_ctx *ctx, uint8_t* output, uint8_t* input, 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) @@ -83,7 +83,7 @@ void AES_CBC_decrypt_buffer(struct AES_ctx *ctx, uint8_t* output, uint8_t* input // 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_CTR_xcrypt_buffer(struct AES_ctx *ctx, uint8_t* output, uint8_t* input, uint32_t length); +void AES_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length); #endif // #if defined(CTR) && (CTR == 1) |