• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/openssl/crypto/evp/

Lines Matching refs:cipher

73 	/* ctx->cipher=NULL; */
77 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
80 if (cipher)
82 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc);
127 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
143 if (ctx->engine && ctx->cipher && (!cipher ||
144 (cipher && (cipher->nid == ctx->cipher->nid))))
147 if (cipher)
167 impl = ENGINE_get_cipher_engine(cipher->nid);
171 const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
181 /* We'll use the ENGINE's private cipher definition */
182 cipher = c;
184 * 'cipher' came from an ENGINE and we need to release
191 ctx->cipher=cipher;
192 if (ctx->cipher->ctx_size)
194 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
205 ctx->key_len = cipher->key_len;
207 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
216 else if(!ctx->cipher)
225 OPENSSL_assert(ctx->cipher->block_size == 1
226 || ctx->cipher->block_size == 8
227 || ctx->cipher->block_size == 16);
260 if (!(ctx->cipher->flags & EVP_CIPH_FLAG_FIPS)
264 ERR_add_error_data(2, "cipher=",
265 EVP_CIPHER_name(ctx->cipher));
266 ctx->cipher = &bad_cipher;
272 if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
273 if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
277 ctx->block_mask=ctx->cipher->block_size-1;
303 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
306 return EVP_CipherInit(ctx, cipher, key, iv, 1);
309 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
312 return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 1);
315 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
318 return EVP_CipherInit(ctx, cipher, key, iv, 0);
321 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
324 return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 0);
335 if(ctx->cipher->do_cipher(ctx,out,in,inl))
347 bl=ctx->cipher->block_size;
362 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;
375 if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;
396 b=ctx->cipher->block_size;
418 ret=ctx->cipher->do_cipher(ctx,out,ctx->buf,b);
441 b=ctx->cipher->block_size;
487 b=ctx->cipher->block_size;
520 n=ctx->cipher->block_size-n;
532 if (c->cipher != NULL)
534 if(c->cipher->cleanup && !c->cipher->cleanup(c))
536 /* Cleanse cipher context data */
538 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
554 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
557 if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH))
576 if(!ctx->cipher) {
581 if(!ctx->cipher->ctrl) {
586 ret = ctx->cipher->ctrl(ctx, type, arg, ptr);