Returns the Base64-encoded version of bin
. This method complies with RFC 4648. No line feeds are added.
Returns the Base64-decoded version of str
. This method complies with RFC 4648. ArgumentError
is raised if str
is incorrectly padded or contains non-alphabet characters. Note that CR or LF are also rejected.
Returns the Base64-encoded version of bin
. This method complies with “Base 64 Encoding
with URL and Filename Safe Alphabet” in RFC 4648. The alphabet uses ‘-’ instead of ‘+’ and ‘_’ instead of ‘/’. Note that the result can still contain ‘=’. You can remove the padding by setting padding
as false.
Returns the Base64-decoded version of str
. This method complies with “Base 64 Encoding
with URL and Filename Safe Alphabet” in RFC 4648. The alphabet uses ‘-’ instead of ‘+’ and ‘_’ instead of ‘/’.
The padding character is optional. This method accepts both correctly-padded and unpadded input. Note that it still rejects incorrectly-padded input.
Get the ‘current’ server.
In the context of execution taking place within the main thread of a dRuby server (typically, as a result of a remote call on the server or one of its objects), the current server is that server. Otherwise, the current server is the primary server.
If the above rule fails to find a server, a DRbServerNotFound
error is raised.
Get the ‘current’ server.
In the context of execution taking place within the main thread of a dRuby server (typically, as a result of a remote call on the server or one of its objects), the current server is that server. Otherwise, the current server is the primary server.
If the above rule fails to find a server, a DRbServerNotFound
error is raised.
Outputs the results from the profiler.
See Profiler__
for more information.
An Array of the default sources that come with RubyGems
Indicates whether this DH
instance has a private key associated with it or not. The private key may be retrieved with DH#priv_key.
Writes string
to the SSL
connection.
Checks that cert signature is made with PRIVversion of this PUBLIC ‘key’
key
- the public key to be used for verifying the SPKI
signature
Returns true
if the signature is valid, false
otherwise. To verify an SPKI
, the public key contained within the SPKI
should be used.
Verifies this request using the given certificates
and X509
store
.
Verifies the signature of the response using the given certificates
, store
and flags
.
Returns the serial number of the issuing certificate.
To verify the String
signature
, digest
, an instance of OpenSSL::Digest
, must be provided to re-compute the message digest of the original data
, also a String
. The return value is true
if the signature is valid, false
otherwise. A PKeyError
is raised should errors occur. Any previous state of the Digest
instance is irrelevant to the validation outcome, the digest instance is reset to its initial state during the operation.
data = 'Sign me!' digest = OpenSSL::Digest::SHA256.new pkey = OpenSSL::PKey::RSA.new(2048) signature = pkey.sign(digest, data) pub_key = pkey.public_key puts pub_key.verify(digest, signature, data) # => true