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

Lines Matching refs:cipher

74 	/* ctx->cipher=NULL; */
85 int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
88 if (cipher)
90 return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc);
93 int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
109 if (ctx->engine && ctx->cipher && (!cipher ||
110 (cipher && (cipher->nid == ctx->cipher->nid))))
113 if (cipher)
133 impl = ENGINE_get_cipher_engine(cipher->nid);
137 const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
147 /* We'll use the ENGINE's private cipher definition */
148 cipher = c;
150 * 'cipher' came from an ENGINE and we need to release
158 ctx->cipher=cipher;
159 if (ctx->cipher->ctx_size)
161 ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
172 ctx->key_len = cipher->key_len;
174 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
183 else if(!ctx->cipher)
192 OPENSSL_assert(ctx->cipher->block_size == 1
193 || ctx->cipher->block_size == 8
194 || ctx->cipher->block_size == 16);
222 if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
223 if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
227 ctx->block_mask=ctx->cipher->block_size-1;
253 int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
256 return EVP_CipherInit(ctx, cipher, key, iv, 1);
259 int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *cipher, ENGINE *impl,
262 return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 1);
265 int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
268 return EVP_CipherInit(ctx, cipher, key, iv, 0);
271 int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
274 return EVP_CipherInit_ex(ctx, cipher, impl, key, iv, 0);
285 if(ctx->cipher->do_cipher(ctx,out,in,inl))
297 bl=ctx->cipher->block_size;
312 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;
325 if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;
347 b=ctx->cipher->block_size;
369 ret=ctx->cipher->do_cipher(ctx,out,ctx->buf,b);
393 b=ctx->cipher->block_size;
439 b=ctx->cipher->block_size;
472 n=ctx->cipher->block_size-n;
493 if (c->cipher != NULL)
495 if(c->cipher->cleanup && !c->cipher->cleanup(c))
497 /* Cleanse cipher context data */
499 OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
515 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
518 if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH))
537 if(!ctx->cipher) {
542 if(!ctx->cipher->ctrl) {
547 ret = ctx->cipher->ctrl(ctx, type, arg, ptr);
557 if (ctx->cipher->flags & EVP_CIPH_RAND_KEY)