Class: PqcRails::ActiveRecord::KeyProvider::Key

Inherits:
Struct
  • Object
show all
Defined in:
lib/pqc_rails/active_record/key_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#secretObject

Returns the value of attribute secret

Returns:

  • (Object)

    the current value of secret



28
29
30
# File 'lib/pqc_rails/active_record/key_provider.rb', line 28

def secret
  @secret
end

Instance Method Details

#idObject



29
30
31
# File 'lib/pqc_rails/active_record/key_provider.rb', line 29

def id
  Digest::SHA1.hexdigest(secret.public_key).first(4)
end

#public_tagsObject



33
34
35
# File 'lib/pqc_rails/active_record/key_provider.rb', line 33

def public_tags
  @public_tags ||= ::ActiveRecord::Encryption::Properties.new
end