diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-05-28 12:44:46 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-05-28 12:44:46 +0000 |
commit | 360370d9530d552078a453f7333faeab0039268f (patch) | |
tree | 8bc290cacd648726e273496e748e1f1f1eba6695 /crypto/evp/e_xcbc_d.c | |
parent | 1fab73ac856225762dae9ef738e792b5ccbd8a32 (diff) |
Third phase of EVP cipher overhaul.
Remove duplicated code in EVP.
Diffstat (limited to 'crypto/evp/e_xcbc_d.c')
-rw-r--r-- | crypto/evp/e_xcbc_d.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/crypto/evp/e_xcbc_d.c b/crypto/evp/e_xcbc_d.c index 067b721a0f..e5dcdebe16 100644 --- a/crypto/evp/e_xcbc_d.c +++ b/crypto/evp/e_xcbc_d.c @@ -91,15 +91,10 @@ static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, { des_cblock *deskey = (des_cblock *)key; - if (iv != NULL) - memcpy(&(ctx->oiv[0]),iv,8); - memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); - if (deskey != NULL) - { - des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks); - memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8); - memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8); - } + des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks); + memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8); + memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8); + return 1; } |