new

Digest::SHA2.new(bitlen = 256) â digest_obj Class Public methods Creates a new SHA2 hash object with a given bit length. Valid bit lengths are 256, 384 and 512.

<<

<<(str) Instance Public methods Alias for: update

block_length

digest_obj.block_length â Integer Instance Public methods Returns the block length of the digest in bytes. Digest::SHA256.new.block_length * 8 # => 512 Digest::SHA384.new.block_length * 8 # => 1024 Digest::SHA512.new.block_length * 8 # => 1024

digest_length

digest_obj.digest_length â Integer Instance Public methods Returns the length of the hash value of the digest in bytes. Digest::SHA256.new.digest_length * 8 # => 256 Digest::SHA384.new.digest_length * 8 # => 384 Digest::SHA512.new.digest_length * 8 # => 512 For example, digests produced by Digest::SHA256 will always be 32 bytes (256 bits) in size.

reset

digest_obj.reset â digest_obj Instance Public methods Resets the digest to the initial state and returns self.

update

digest_obj.update(string) â digest_objdigest_obj Instance Public methods Updates the digest using a given string and returns self. <<

hexencode

Digest.hexencode(string) â hexencoded_string Class Public methods Generates a hex-encoded version of a given string.

[]

Dir[ string [, string ...] ] â array Class Public methods Equivalent to calling Dir.glob([string,...],0).

chdir

Dir.chdir( [ string] ) â 0Dir.chdir( [ string] ) {| path | block } â anObject Class Public methods Changes the current working directory of the process to the given string. When called without an argument, changes the directory to the value of the environment variable HOME, or LOGDIR. SystemCallError (probably Errno::ENOENT) if the target directory does not exist. If a block is given, it is passed the name of the new current directory, and the block is executed with that as the c

chroot

Dir.chroot( string ) â 0 Class Public methods Changes this process's idea of the file system root. Only a privileged process may make this call. Not available on all platforms. On Unix systems, see chroot(2) for more information.