class Virgil::SDK::Cryptography::Hashes::Fingerprint

Fingerprint container class.

Class provides methods for importing and exporting fingerprints.

Public Class Methods

from_hex(fingerprint_hex) click to toggle source

Creates new Fingerprint from hex.

Args:

fingerprint_hex: hex string of the fingerprint.

Returns:

Imported Fingerprint.
# File lib/virgil/sdk/cryptography/hashes/fingerprint.rb, line 54
def self.from_hex(fingerprint_hex)
  data = Crypto::Native::VirgilByteArrayUtils.hex_to_bytes(fingerprint_hex)
  return self.new(data)
end
new(fingerprint_bytes) click to toggle source
# File lib/virgil/sdk/cryptography/hashes/fingerprint.rb, line 43
def initialize(fingerprint_bytes)
  @fingerprint_bytes = fingerprint_bytes
end

Public Instance Methods

to_hex() click to toggle source

Fingerprint data in hexadecimal.

Returns:

Hexademical fingerprint representation.
# File lib/virgil/sdk/cryptography/hashes/fingerprint.rb, line 71
def to_hex
  hex_data = Crypto::Native::VirgilByteArrayUtils.bytes_to_hex(value)
  return hex_data
end
value() click to toggle source

Raw fingerprint value.

Returns:
  Fingerprint bytes.
# File lib/virgil/sdk/cryptography/hashes/fingerprint.rb, line 63
def value
  @fingerprint_bytes
end