Like Enumerable#drop
, but chains operation to be lazy-evaluated.
Like Enumerable#uniq
, but chains operation to be lazy-evaluated.
Return the length of the hash value in bytes.
Return the block length of the digest in bytes.
Disable a call to dlclose() when this handle is garbage collected.
Enable a call to dlclose() when this handle is garbage collected.
Returns true
if dlclose() will be called when this handle is garbage collected.
See man(3) dlclose() for more info.
Generates and sets the key/IV based on a password.
WARNING: This method is only PKCS5
v1.5 compliant when using RC2, RC4-40, or DES with MD5 or SHA1. Using anything else (like AES) will generate the key/iv using an OpenSSL
specific method. This method is deprecated and should no longer be used. Use a PKCS5
v2 key generation method from OpenSSL::PKCS5
instead.
salt must be an 8 byte string if provided.
iterations is an integer with a default of 2048.
digest is a Digest
object that defaults to ‘MD5’
A minimum of 1000 iterations is recommended.
Returns the size in bytes of the blocks on which this Cipher
operates on.
Gets the value of key from the given section
Given the following configurating file being loaded:
config = OpenSSL::Config.load('foo.cnf') #=> #<OpenSSL::Config sections=["default"]> puts config.to_s #=> [ default ] # foo=bar
You can get a specific value from the config if you know the section and key like so:
config.get_value('default','foo') #=> "bar"
Returns the output size of the digest, i.e. the length in bytes of the final message digest result.
digest = OpenSSL::Digest::SHA1.new puts digest.digest_length # => 20
Returns the block length of the digest algorithm, i.e. the length in bytes of an individual block. Most modern algorithms partition a message to be digested into a sequence of fix-sized blocks that are processed consecutively.
digest = OpenSSL::Digest::SHA1.new puts digest.block_length # => 64
Called before each event with line/column information.
This method is called when a parse error is found.
ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling token_to_str
.
ERROR_VALUE is a value of error token.
value_stack is a stack of symbol values. DO NOT MODIFY this object.
This method raises ParseError
by default.
If this method returns, parsers enter “error recovering mode”.
See Zlib::GzipReader
documentation for a description.