Returns a new instance of OpenSSL::Cipher
by name, if it is available in this engine.
An EngineError
will be raised if the cipher is unavailable.
e = OpenSSL::Engine.by_id("openssl") => #<OpenSSL::Engine id="openssl" name="Software engine support"> e.cipher("RC4") => #<OpenSSL::Cipher:0x007fc5cacc3048>
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'
Enter error recovering mode. This method does not call on_error
.
Leave error recovering mode.
Returns the adler-32 checksum.
Returns true if the stream is closed.
Closes the stream. All operations on the closed stream will raise an exception.
Closes the GzipFile
object. This method calls close method of the associated IO
object. Returns the associated IO
object.
Same as IO#closed?
See Zlib::GzipReader
documentation for a description.
See Zlib::GzipReader
documentation for a description.
See Zlib::GzipReader
documentation for a description.
See Zlib::GzipReader
documentation for a description.
See Zlib::GzipReader
documentation for a description. However, note that this method can return nil
even if eof?
returns false, unlike the behavior of File#gets
.
Returns the number of native file system blocks allocated for this file, or nil
if the operating system doesn’t support this feature.
File.stat("testfile").blocks #=> 2
Returns true
if stat is a zero-length file; false
otherwise.
File.stat("testfile").zero? #=> false
Returns true
if the file is a block device, false
if it isn’t or if the operating system doesn’t support this feature.
File.stat("testfile").blockdev? #=> false File.stat("/dev/hda1").blockdev? #=> true
Returns true
if key
is registered
Returns a new Tms
object obtained by memberwise operation op
of the individual times for this Tms
object with those of the other Tms
object (x
).
op
can be a mathematical operation such as +
, -
, *
, /