Method: OpenSSL::Cipher#encrypt

Defined in:
ext/openssl/ossl_cipher.c

#encryptself

Initializes the Cipher for encryption.

Make sure to call either #encrypt or #decrypt before using the Cipher for any operation or setting any parameters.

Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 1).

Returns:

  • (self)


256
257
258
259
260
# File 'ext/openssl/ossl_cipher.c', line 256

static VALUE
ossl_cipher_encrypt(VALUE self)
{
    return ossl_cipher_init(self, 1);
}