Sha256: 455c50a3c03f84f54a601ecb4ce848e9c45211dd5b5eda2d13a4df4e2987b84e

Contents?: true

Size: 387 Bytes

Versions: 4

Compression:

Stored size: 387 Bytes

Contents

module VaultTree
  class SplitKeyCrypto
    attr_reader :required_keys

    def initialize(opts)
      @required_keys = opts[:required_keys]
    end

    def generate
      secure_hash key_digests.join('')
    end

    private

    def key_digests
      required_keys.map{|k| secure_hash(k) }
    end

    def secure_hash(s)
      LockSmith.new(message: s).secure_hash
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vault-tree-0.8.0 lib/vault-tree/lock_smith/split_key_crypto.rb
vault-tree-0.6.0 lib/vault-tree/lock_smith/split_key_crypto.rb
vault-tree-0.3.4 lib/vault-tree/lock_smith/split_key.rb
vault-tree-0.3.3 lib/vault-tree/lock_smith/split_key.rb