Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

OpenSSL::Engine#digest

engine.digest(name) → OpenSSL::Digest

Returns a new instance of OpenSSL::Digest by name.

Will raise an EngineError if the digest is unavailable.

Example
e = OpenSSL::Engine.by_id("openssl")
  #=> #<OpenSSL::Engine id="openssl" name="Software engine support">
e.digest("SHA1")
  #=> #<OpenSSL::Digest: da39a3ee5e6b4b0d3255bfef95601890afd80709>
e.digest("zomg")
  #=> OpenSSL::Engine::EngineError: no such digest `zomg'
See also #ctrl_cmd #finish #cmds #id also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0