Change what’s displayed on the screen to reflect the current contents.
See GNU Readline’s rl_redisplay function.
Raises NotImplementedError
if the using readline library does not support.
Disables garbage collection, returning true
if garbage collection was already disabled.
GC.disable #=> false GC.disable #=> true
Returns true
if the entry is a directory (i.e., the value of the type fact is dir, cdir, or pdir).
Creates a new directory in the tar file name
with mode
Returns a string usable in Dir.glob
to match all requirable paths for this spec.
Make directories for index generation
Iterates over keys and objects in a weakly referenced object
Calls the given block once for each key
, value
pair in the database.
Returns self
.
@api private
Returns true
if the MKD command may be used to create a new directory within the directory.
Returns the first number in this arithmetic sequence, or an array of the first n
elements.
Returns the hash value of a given string. This is equivalent to Digest::Class.new(*parameters)
.digest(string), where extra parameters, if any, are passed through to the constructor and the string is passed to digest()
.
Returns the hex-encoded hash value of a given string. This is almost equivalent to Digest.hexencode
(Digest::Class.new(*parameters)
.digest(string)).
Returns the base64 encoded hash value of a given string. The return value is properly padded with ‘=’ and contains no line feeds.
Enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.
See EVP_CIPHER_CTX_set_padding for further information.
Return the hash value computed with name Digest
. name is either the long name or short name of a supported digest algorithm.
OpenSSL::Digest.digest("SHA256", "abc")
which is equivalent to:
OpenSSL::Digest.digest('SHA256', "abc")
Returns the authentication code as a binary string. The digest parameter specifies the digest algorithm to use. This may be a String
representing the algorithm name or an instance of OpenSSL::Digest
.
key = 'key' data = 'The quick brown fox jumps over the lazy dog' hmac = OpenSSL::HMAC.digest('sha1', key, data) #=> "\xDE|\x9B\x85\xB8\xB7\x8A\xA6\xBC\x8Az6\xF7\n\x90p\x1C\x9D\xB4\xD9"
Returns the authentication code as a hex-encoded string. The digest parameter specifies the digest algorithm to use. This may be a String
representing the algorithm name or an instance of OpenSSL::Digest
.
key = 'key' data = 'The quick brown fox jumps over the lazy dog' hmac = OpenSSL::HMAC.hexdigest('sha1', key, data) #=> "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
Returns the authentication code an instance represents as a binary string.
instance = OpenSSL::HMAC.new('key', OpenSSL::Digest.new('sha1')) #=> f42bb0eeb018ebbd4597ae7213711ec60760843f instance.digest #=> "\xF4+\xB0\xEE\xB0\x18\xEB\xBDE\x97\xAEr\x13q\x1E\xC6\a`\x84?"
Returns the authentication code an instance represents as a hex-encoded string.
Returns a new instance of OpenSSL::Digest
by name.
Will raise an EngineError
if the digest is unavailable.
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'