Results for: "module_function"

Return the length of the hash value in bytes.

Return the block length of the digest in bytes.

Return 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

Return the length of the hash value (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.

Returns the file name of this handle.

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.

Calls wait repeatedly while the given block yields a truthy value.

No documentation available

Sets the key length of the cipher. If the cipher is a fixed length cipher then attempting to set the key length to any value other than the fixed value is an error.

Under normal circumstances you do not need to call this method (and probably shouldn’t).

See EVP_CIPHER_CTX_set_key_length for further information.

Returns the key length in bytes of the Cipher.

Sets the IV/nonce length of the Cipher. Normally block ciphers don’t allow changing the IV length, but some make use of IV for ‘nonce’. You may need this for interoperability with other applications.

Returns the expected length in bytes for an IV for this Cipher.

Returns the output size of the digest, i.e. the length in bytes of the final message digest result.

Example

digest = OpenSSL::Digest.new('SHA1')
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.

Example

digest = OpenSSL::Digest.new('SHA1')
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.

All flags

0xFFFF

No flags

0x0000

See also <openssl/engine.h>

Returns the raw error code occurred at name resolution.

Delete a registry value named name. We can not delete the ‘default’ value.

Delete a subkey named name and all its values.

If recursive is false, the subkey must not have subkeys. Otherwise, this method deletes all subkeys and values recursively.

Returns OLE type of WIN32OLE::Param object(parameter of OLE method).

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Workbook')
method = WIN32OLE::Method.new(tobj, 'SaveAs')
param1 = method.params[0]
puts param1.ole_type # => VARIANT

Returns value specified by the member name of VT_RECORD OLE variable. Or sets value specified by the member name of VT_RECORD OLE variable. If the member name is not correct, KeyError exception is raised.

If COM server in VB.NET ComServer project is the following:

Imports System.Runtime.InteropServices
Public Class ComClass
    Public Structure Book
        <MarshalAs(UnmanagedType.BStr)> _
        Public title As String
        Public cost As Integer
    End Structure
End Class

Then getting/setting value from Ruby is as the following:

obj = WIN32OLE.new('ComServer.ComClass')
book = WIN32OLE::Record.new('Book', obj)
book.title # => nil ( book.method_missing(:title) is invoked. )
book.title = "Ruby" # ( book.method_missing(:title=, "Ruby") is invoked. )

Returns array of WIN32OLE::Type objects defined by the typelib type library.

This method will be OBSOLETE. Use WIN32OLE::TypeLib.new(typelib).ole_classes instead.

returns type of OLE class.

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Application')
puts tobj.ole_type  # => Class

Returns the WIN32OLE::TypeLib object which is including the WIN32OLE::Type object. If it is not found, then returns nil.

tobj = WIN32OLE::Type.new('Microsoft Excel 9.0 Object Library', 'Worksheet')
puts tobj.ole_typelib # => 'Microsoft Excel 9.0 Object Library'
Search took: 7ms  ·  Total Results: 5313