This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

sign_raw

        # OpenSSL::PKey::PKey.sign_raw

(from ruby core)
### Implementation from PKey
---
    pkey.sign_raw(digest, data [, options]) -> string

---

Signs `data` using a private key `pkey`. Unlike #sign, `data` will not
be hashed by `digest` automatically.

See #verify_raw for the verification operation.

Added in version 3.0. See also the man page EVP_PKEY_sign(3).

`digest`
:   A String that represents the message digest algorithm name, or `nil`
    if the PKey type requires no digest algorithm. Although this method
    will not hash `data` with it, this parameter may still be required
    depending on the signature algorithm.
`data`
:   A String. The data to be signed.
`options`
:   A Hash that contains algorithm specific control operations to
    OpenSSL. See OpenSSL's man page EVP_PKEY_CTX_ctrl_str(3) for
    details.


Example:
    data = "Sign me!"
    hash = OpenSSL::Digest.digest("SHA256", data)
    pkey = OpenSSL::PKey.generate_key("RSA", rsa_keygen_bits: 2048)
    signopts = { rsa_padding_mode: "pss" }
    signature = pkey.sign_raw("SHA256", hash, signopts)

    # Creates a copy of the RSA key pkey, but without the private components
    pub_key = pkey.public_key
    puts pub_key.verify_raw("SHA256", signature, hash, signopts) # => true



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.