class Veil::Hasher::Base
Public Instance Methods
encrypt(group, name, version)
click to toggle source
Hash the credential group, name and version with the stored secret and salt
@param [String] group
The service group name, eg: postgresql
@param [String] name
The credential name, eg: sql_password
@param [Integer] version
The Credential version, eg: 1
@return [String] SHA512 hex digest of hashed data
# File lib/veil/hasher/base.rb, line 20 def encrypt(group, name, version) raise Veil::NotImplmented.new("#{caller[0]} has not implemented #encrypt") end
to_hash()
click to toggle source
Return the instance as a Hash
@return [Hash<Symbol,String>]
# File lib/veil/hasher/base.rb, line 27 def to_hash raise Veil::NotImplmented.new("#{caller[0]} has not implemented #to_hash") end
Private Instance Methods
hex_digest(data)
click to toggle source
Create a SHA512 hex digest
@param [String] data
Data to digest
@return [String]
# File lib/veil/hasher/base.rb, line 39 def hex_digest(data) OpenSSL::Digest::SHA512.hexdigest(data) end