EVP_CipherInit
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
LCRYPTO_ALIAS(EVP_CipherInit);
return EVP_CipherInit(ctx, cipher, key, iv, 1);
return EVP_CipherInit(ctx, cipher, key, iv, 0);
LCRYPTO_USED(EVP_CipherInit);
if (EVP_CipherInit(ctx, cipher, key->ptr, nonce->ptr, encrypt) == 0) {
if (EVP_CipherInit(ctx, cipher, key->ptr, iv, encrypt) == 0 ||
if (!EVP_CipherInit(ctx, cipher, key, iv, do_enc)) {
if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 1) ||
if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 0))
if (!EVP_CipherInit(ctx->main_evp, EVP_chacha20(), key, NULL, 1))
if (!EVP_CipherInit(ctx->header_evp, EVP_chacha20(), key + 32, NULL, 1))
if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
if (EVP_CipherInit(cc->evp, type, NULL, (u_char *)iv,
if (EVP_CipherInit(cc->evp, NULL, (u_char *)key, NULL, -1) == 0) {
if (!EVP_CipherInit(ctx, cipher, privkey, iv, do_encrypt)) {
if (!EVP_CipherInit(ctx, evp, key, NULL, 0)) {
if (!EVP_CipherInit(ctx, NULL, NULL, data, 0))