1
0
Fork 0
This repository has been archived on 2023-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/app/primitives/private_key.rb

21 lines
391 B
Ruby

# frozen_string_literal: true
class PrivateKey
attr_reader :asymmetric_key
delegate :account, to: :asymmetric_key
def self.policy_class
'PrivateKeyPolicy'
end
def initialize(asymmetric_key)
@asymmetric_key = asymmetric_key or raise
end
def exist?
asymmetric_key.private_key_pem_iv.present? &&
asymmetric_key.private_key_pem_ciphertext.present?
end
end