diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-06-25 21:40:49 +0200 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-06-25 21:40:49 +0200 |
commit | bb2131cbf83b57550d3af9d7c66e52c61db8cf60 (patch) | |
tree | 0a68cbb78048ef6b504c77e63b8a38ac6d1eb40b /aes-encrypt.c | |
parent | b27be3a688b814832b965b15680f9ccd053a0753 (diff) | |
download | nettle-bb2131cbf83b57550d3af9d7c66e52c61db8cf60.tar.gz |
New interface for AES-128.
Diffstat (limited to 'aes-encrypt.c')
-rw-r--r-- | aes-encrypt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/aes-encrypt.c b/aes-encrypt.c index 0077693a..643276af 100644 --- a/aes-encrypt.c +++ b/aes-encrypt.c @@ -43,3 +43,13 @@ aes_encrypt(const struct aes_ctx *ctx, _aes_encrypt(ctx->rounds, ctx->keys, &_aes_encrypt_table, length, dst, src); } + +void +aes128_encrypt(const struct aes128_ctx *ctx, + size_t length, uint8_t *dst, + const uint8_t *src) +{ + assert(!(length % AES_BLOCK_SIZE) ); + _aes_encrypt(_AES128_ROUNDS, ctx->keys, &_aes_encrypt_table, + length, dst, src); +} |