diff --git a/lib/cipher/cryb_aes.c b/lib/cipher/cryb_aes.c index 2a72472..c642489 100644 --- a/lib/cipher/cryb_aes.c +++ b/lib/cipher/cryb_aes.c @@ -585,18 +585,6 @@ aes_init(aes_ctx *ctx, cipher_mode mode, const uint8_t *key, size_t keylen) aes_setkey_enc(ctx, key, keylen); } - -void -aes_update(aes_ctx *ctx, const void *in, size_t len, void *out) -{ - - (void)len; - if (ctx->mode == CIPHER_MODE_DECRYPT) - aes_dec(ctx, in, out); - else - aes_enc(ctx, in, out); -} - size_t aes_encrypt(aes_ctx *ctx, const void *vpt, uint8_t *ct, size_t len) { diff --git a/lib/cipher/cryb_rc4.c b/lib/cipher/cryb_rc4.c index 5dc7181..3a170cb 100644 --- a/lib/cipher/cryb_rc4.c +++ b/lib/cipher/cryb_rc4.c @@ -95,10 +95,10 @@ rc4_encrypt(rc4_ctx *ctx, const void *vpt, uint8_t *ct, size_t len) } size_t -rc4_decrypt(rc4_ctx *ctx, const uint8_t *in, void *out, size_t len) +rc4_decrypt(rc4_ctx *ctx, const uint8_t *ct, void *vpt, size_t len) { - return (rc4_encrypt(ctx, in, out, len)); + return (rc4_encrypt(ctx, ct, vpt, len)); } void diff --git a/t/t_aes.c b/t/t_aes.c index 2ba4f8d..a20adcb 100644 --- a/t/t_aes.c +++ b/t/t_aes.c @@ -49,6 +49,7 @@ struct t_case { /*************************************************************************** * Test cases */ + static struct t_case t_cases[] = { /* FIPS-197 test vectors */ { @@ -107,6 +108,7 @@ static struct t_case t_cases[] = { /*************************************************************************** * Test functions */ + static int t_aes_enc(char **desc, void *arg) { diff --git a/t/t_rc4.c b/t/t_rc4.c index d6788a4..bce9e47 100644 --- a/t/t_rc4.c +++ b/t/t_rc4.c @@ -51,6 +51,7 @@ struct t_case { /*************************************************************************** * Test cases */ + static struct t_case t_cases[] = { /* test vectors from RFC 6229 */ { @@ -1962,6 +1963,7 @@ static struct t_case t_cases[] = { /*************************************************************************** * Test functions */ + static int t_rc4(char **desc CRYB_UNUSED, void *arg) {