Skip to content
instance method

OpenSSL::Engine#cipher

(::String cipher) -> ::OpenSSL::Cipher
engine.cipher(name) → OpenSSL::Cipher

Returns a new instance of OpenSSL::Cipher by name, if it is available in this engine.

An EngineError will be raised if the cipher is unavailable.

e = OpenSSL::Engine.by_id("openssl")
 => #<OpenSSL::Engine id="openssl" name="Software engine support">
e.cipher("RC4")
 => #<OpenSSL::Cipher:0x007fc5cacc3048>
See also .load #cmds .engines #ctrl_cmd also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0