Lines Matching refs:ctx
69 static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
71 static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
82 #define data(ctx) ((DESX_CBC_KEY *)(ctx)->cipher_data)
104 static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
109 DES_set_key_unchecked(deskey,&data(ctx)->ks);
110 memcpy(&data(ctx)->inw[0],&key[8],8);
111 memcpy(&data(ctx)->outw[0],&key[16],8);
116 static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
121 DES_xcbc_encrypt(in,out,(long)EVP_MAXCHUNK,&data(ctx)->ks,
122 (DES_cblock *)&(ctx->iv[0]),
123 &data(ctx)->inw,
124 &data(ctx)->outw,
125 ctx->encrypt);
131 DES_xcbc_encrypt(in,out,(long)inl,&data(ctx)->ks,
132 (DES_cblock *)&(ctx->iv[0]),
133 &data(ctx)->inw,
134 &data(ctx)->outw,
135 ctx->encrypt);