Lines Matching refs:ctx
69 int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek,
76 EVP_CIPHER_CTX_init(ctx);
77 if(!EVP_EncryptInit_ex(ctx,type,NULL,NULL,NULL)) return 0;
81 if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
83 if (EVP_CIPHER_CTX_iv_length(ctx))
84 RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx));
86 if(!EVP_EncryptInit_ex(ctx,NULL,NULL,key,iv)) return 0;
90 ekl[i]=EVP_PKEY_encrypt_old(ek[i],key,EVP_CIPHER_CTX_key_length(ctx),
98 void EVP_SealUpdate(ctx,out,outl,in,inl)
99 EVP_CIPHER_CTX *ctx;
105 EVP_EncryptUpdate(ctx,out,outl,in,inl);
109 int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
112 i = EVP_EncryptFinal_ex(ctx,out,outl);
114 i = EVP_EncryptInit_ex(ctx,NULL,NULL,NULL,NULL);