64 #ifndef OPENSSL_NO_ENGINE
68 #include <openssl/fips.h>
73 #define M_do_cipher(ctx, out, in, inl) FIPS_cipher(ctx, out, in, inl)
75 #define M_do_cipher(ctx, out, in, inl) ctx->cipher->do_cipher(ctx, out, in, inl)
96 const unsigned char *
key,
const unsigned char *iv,
int enc)
104 const unsigned char *
key,
const unsigned char *iv,
int enc)
114 #ifndef OPENSSL_NO_ENGINE
136 #ifndef OPENSSL_NO_ENGINE
174 return FIPS_cipherinit(ctx, cipher, key, iv, enc);
206 #ifndef OPENSSL_NO_ENGINE
211 return FIPS_cipherinit(ctx, cipher, key, iv, enc);
234 (
int)
sizeof(ctx->
iv));
253 if(!ctx->
cipher->
init(ctx,key,iv,enc))
return 0;
262 const unsigned char *in,
int inl)
284 const unsigned char *
key,
const unsigned char *iv)
290 const unsigned char *
key,
const unsigned char *iv)
296 const unsigned char *
key,
const unsigned char *iv)
302 const unsigned char *
key,
const unsigned char *iv)
308 const unsigned char *in,
int inl)
348 memcpy(&(ctx->
buf[i]),in,inl);
356 memcpy(&(ctx->
buf[i]),in,j);
375 memcpy(ctx->
buf,&(in[inl]),i);
390 unsigned int i,
b, bl;
434 const unsigned char *in,
int inl)
466 memcpy(out,ctx->
final,b);
483 memcpy(ctx->
final,&out[*outl],b);
537 if (n == 0 || n > (
int)b)
544 if (ctx->
final[--b] != n)
552 out[i]=ctx->
final[i];
583 #ifndef OPENSSL_NO_ENGINE
590 FIPS_cipher_ctx_cleanup(c);
600 if(c->
key_len == keylen)
return 1;
649 if ((in == NULL) || (in->
cipher == NULL))
654 #ifndef OPENSSL_NO_ENGINE
664 memcpy(out,in,
sizeof *out);