Sha256: 70a2c9e1b249b7541ce3c9813ed61890cdf99e5665c74630d5028a1737f777ff

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

module Stribog
  # Digest
  #
  # Class, returning by CreateHash#call
  # Contains binary and hex representation of digest.
  # You can use {#binary} to get array and {#hex} to get digest in hash.
  # @author WildDima
  class Digest
    # Contains binary representation of hash
    #
    # @api public
    # @example
    #   digest.binary
    # @return [Array] binary representation of digest
    attr_reader :binary
    # Contains hex value of hash
    #
    # @api public
    # @example
    #   digest.hex
    # @return [String] hex representation of digest
    attr_reader :hex

    def initialize(binary_vector:)
      @binary = binary_vector.vector
      @hex = binary_vector.to_hex
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stribog-0.1.3 lib/stribog/digest.rb