Update README.md

This commit is contained in:
kokke 2017-12-19 02:04:39 +01:00 committed by GitHub
parent 6dfe50fd61
commit ba795cdc9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -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);