class Win32::Certstore::Mixin::Crypto::CRYPT_HASH_BLOB
Public Class Methods
new(str = nil)
click to toggle source
Calls superclass method
# File lib/win32/certstore/mixin/crypto.rb, line 142 def initialize(str = nil) super(nil) if str byte_arr = [str].pack("H*").unpack("C*") # Converting string to its byte array buffer = FFI::MemoryPointer.new(:char, byte_arr.size) # Create the pointer to the array buffer.put_array_of_char 0, byte_arr # Fill the memory location with data self[:pbData] = buffer self[:cbData] = byte_arr.size end end