mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-11-26 23:55:42 +00:00
Remove unused struct member.
This commit is contained in:
parent
f35e970d05
commit
93af184693
2 changed files with 1 additions and 3 deletions
|
@ -52,7 +52,6 @@ extern cipher_algorithm aes192_cipher;
|
||||||
extern cipher_algorithm aes256_cipher;
|
extern cipher_algorithm aes256_cipher;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int mode;
|
|
||||||
int nr;
|
int nr;
|
||||||
uint32_t rk[68];
|
uint32_t rk[68];
|
||||||
} aes_ctx;
|
} aes_ctx;
|
||||||
|
|
|
@ -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(mode == CIPHER_MODE_ENCRYPT || mode == CIPHER_MODE_DECRYPT);
|
||||||
assert(keylen == 16 || keylen == 24 || keylen == 32);
|
assert(keylen == 16 || keylen == 24 || keylen == 32);
|
||||||
memset(ctx, 0, sizeof *ctx);
|
memset(ctx, 0, sizeof *ctx);
|
||||||
ctx->mode = mode;
|
if (mode == CIPHER_MODE_DECRYPT)
|
||||||
if (ctx->mode == CIPHER_MODE_DECRYPT)
|
|
||||||
aes_setkey_dec(ctx, key, keylen);
|
aes_setkey_dec(ctx, key, keylen);
|
||||||
else
|
else
|
||||||
aes_setkey_enc(ctx, key, keylen);
|
aes_setkey_enc(ctx, key, keylen);
|
||||||
|
|
Loading…
Reference in a new issue