Remove unused struct member.

This commit is contained in:
Dag-Erling Smørgrav 2017-03-21 13:24:02 +01:00
parent 6f794d4739
commit ce5562d568
2 changed files with 1 additions and 3 deletions

View file

@ -52,7 +52,6 @@ extern cipher_algorithm aes192_cipher;
extern cipher_algorithm aes256_cipher;
typedef struct {
int mode;
int nr;
uint32_t rk[68];
} aes_ctx;

View file

@ -581,8 +581,7 @@ aes_init(aes_ctx *ctx, cipher_mode mode, const uint8_t *key, size_t keylen)
assert(mode == CIPHER_MODE_ENCRYPT || mode == CIPHER_MODE_DECRYPT);
assert(keylen == 16 || keylen == 24 || keylen == 32);
memset(ctx, 0, sizeof *ctx);
ctx->mode = mode;
if (ctx->mode == CIPHER_MODE_DECRYPT)
if (mode == CIPHER_MODE_DECRYPT)
aes_setkey_dec(ctx, key, keylen);
else
aes_setkey_enc(ctx, key, keylen);