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
Set
the defaults for this engine with the given flag.
These flags are used to control combinations of algorithm methods.
flag can be one of the following, other flags are available depending on your OS.
0xFFFF
0x0000
See also <openssl/engine.h>
Builds a methods for level meth
.
Returns OS code number recorded in the gzip file header.
Returns true
if stat is readable by the real user id of this process.
File.stat("testfile").readable_real? #=> true
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"
Returns true
if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
If stat is writable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/tmp").world_writable? #=> 511 sprintf("%o", m) #=> "777"
Same as executable?
, but tests using the real owner of the process.
Loads the default specifications. It should be called only once.
Removes spec
from the known specs.
Returns the full path to an executable named name
in this gem.
Returns the full path to the cached gem for this spec.
The default value for specification attribute name
The default (generated) file name of the gem. See also spec_name
.
spec.file_name # => "example-1.0.gem"
Files in the Gem under one of the require_paths
Return a NameTuple that represents this Specification
Return a string containing a Ruby code representation of the given object.
Returns the full path to this spec’s gemspec file. eg: /usr/local/lib/ruby/gems/1.8/specifications/mygem-1.0.gemspec
The default port to use for HTTP
requests; defaults to 80.