Class: HasHelpers::ServiceTrust::Key
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- HasHelpers::ServiceTrust::Key
- Defined in:
- app/models/has_helpers/service_trust/key.rb
Constant Summary collapse
- ENCRYPTION_ACTIVE =
respond_to?(:encrypts)
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.encryption_active? ⇒ Boolean
29 30 31 |
# File 'app/models/has_helpers/service_trust/key.rb', line 29 def self.encryption_active? ENCRYPTION_ACTIVE end |
Instance Method Details
#persisted_backing? ⇒ Boolean
41 42 43 |
# File 'app/models/has_helpers/service_trust/key.rb', line 41 def persisted_backing? persisted? end |
#public_key ⇒ Object
37 38 39 |
# File 'app/models/has_helpers/service_trust/key.rb', line 37 def public_key OpenSSL::PKey.read(public_key_pem) end |
#to_openssl ⇒ Object
33 34 35 |
# File 'app/models/has_helpers/service_trust/key.rb', line 33 def to_openssl OpenSSL::PKey.read(private_key_pem) end |