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

18 lines
334 B
Ruby

# frozen_string_literal: true
class PublicKeyPrivateKey
attr_reader :public_key
def self.policy_class
'PrivateKeyPolicy'
end
def initialize(public_key)
@public_key = public_key or raise
end
def exist?
public_key.private_key_pem_iv.present? &&
public_key.private_key_pem_ciphertext.present?
end
end