Misc cleanup after API change.

This commit is contained in:
Dag-Erling Smørgrav 2017-03-16 18:00:09 +01:00
parent 1073dceed9
commit 1ca9e1928e
4 changed files with 6 additions and 14 deletions

View file

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

View file

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

View file

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

View file

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