summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_aes.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
committerBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
commitdbad169019598981174ff46c7a9bf58373b0e53a (patch)
treece8ca1188d5614648f24b03967785543f1edc8f5 /crypto/evp/e_aes.c
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/evp/e_aes.c')
-rw-r--r--crypto/evp/e_aes.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/evp/e_aes.c b/crypto/evp/e_aes.c
index 79fc9c3ea8..8da3d56ff6 100644
--- a/crypto/evp/e_aes.c
+++ b/crypto/evp/e_aes.c
@@ -53,6 +53,7 @@
#include <openssl/err.h>
#include <string.h>
#include <assert.h>
+#include <openssl/rijndael.h>
static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc);
@@ -70,8 +71,7 @@ static const EVP_CIPHER name##_cipher_st = \
aes_init, \
ciph_func, \
NULL, \
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ \
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rijndael)), \
+ sizeof(RIJNDAEL_KEY), \
EVP_CIPHER_set_asn1_iv, \
EVP_CIPHER_get_asn1_iv, \
NULL, \
@@ -93,7 +93,7 @@ IMPLEMENT_AES_CIPHER(aes_256_cbc, aes_cbc, 32, 32, EVP_CIPH_CBC_MODE)
static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
const unsigned char *iv, int enc)
{
- RIJNDAEL_KEY *k=&ctx->c.rijndael;
+ RIJNDAEL_KEY *k=ctx->cipher_data;
if (enc)
k->rounds = rijndaelKeySetupEnc(k->rd_key, key, ctx->key_len * 8);
else
@@ -105,7 +105,7 @@ static int aes_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
static int aes_ecb(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, unsigned int inl)
{
- RIJNDAEL_KEY *k=&ctx->c.rijndael;
+ RIJNDAEL_KEY *k=ctx->cipher_data;
while(inl > 0)
{
if(ctx->encrypt)
@@ -126,7 +126,7 @@ static int aes_cbc(EVP_CIPHER_CTX *ctx, unsigned char *out,
{
int n;
unsigned char tmp[16];
- RIJNDAEL_KEY *k=&ctx->c.rijndael;
+ RIJNDAEL_KEY *k=ctx->cipher_data;
while(inl > 0)
{
if(ctx->encrypt)