diff options
author | kokke <spam@rowdy.dk> | 2017-12-19 02:04:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 02:04:39 +0100 |
commit | ba795cdc9e618b6733bd7d932960cb9fde5e58fb (patch) | |
tree | d04c763780397434984812f14577a5992302a183 | |
parent | Update aes.c (diff) | |
download | tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar.gz tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar.bz2 tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar.lz tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar.xz tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.tar.zst tiny-AES-c-ba795cdc9e618b6733bd7d932960cb9fde5e58fb.zip |
-rw-r--r-- | README.md | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -8,18 +8,18 @@ The API is very simple and looks like this (I am using C99 `<stdint.h>`-style an ```C /* Initialize context calling one of: */ -void AES_init_ctx(struct AES_ctx *ctx,const uint8_t* key); -void AES_init_ctx_iv(struct AES_ctx *ctx,const uint8_t* key,const uint8_t* iv); +void AES_init_ctx(struct AES_ctx* ctx, const uint8_t* key); +void AES_init_ctx_iv(struct AES_ctx* ctx,const uint8_t* key, const uint8_t* iv); /* ... or reset IV at random point: */ -void AES_ctx_set_iv(struct AES_ctx *ctx,const uint8_t* iv); +void AES_ctx_set_iv(struct AES_ctx* ctx, const uint8_t* iv); /* Then start encrypting and decrypting with the functions below: */ -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); -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); /* Same function for encrypting as for decrypting in CTR mode */ void AES_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, uint32_t length); |