class Underlock::EncryptedEntity
Attributes
encrypted_file[RW]
iv[RW]
key[RW]
value[RW]
Public Class Methods
new(value: nil, encrypted_file: nil, key:, iv:)
click to toggle source
# File lib/underlock/encrypted_entity.rb, line 5 def initialize(value: nil, encrypted_file: nil, key:, iv:) @encrypted_file = encrypted_file @value = value @key = key @iv = iv end
Public Instance Methods
decrypt()
click to toggle source
# File lib/underlock/encrypted_entity.rb, line 12 def decrypt return Encryptor.new.decrypt(self) if value return FileEncryptor.new.decrypt(self) if encrypted_file end
inspect()
click to toggle source
# File lib/underlock/encrypted_entity.rb, line 17 def inspect self.to_s end