Class: Duse::Client::Secret
Constant Summary
Constants inherited from Entity
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
Methods inherited from Entity
add_attribute, attributes, base_path, #delete, id_field, ignore_in_json, #initialize, #load_attribute, many, #missing?, one, #reload, #save, #set_attribute, subclasses, #to_h
Constructor Details
This class inherits a constructor from Duse::Client::Entity
Instance Method Details
#decrypt(private_key) ⇒ Object
88 89 90 91 92 93 94 |
# File 'lib/duse/client/secret.rb', line 88 def decrypt(private_key) # require private_key to be private rsa key # require shares to be set (real shares object in the future) # require cipher_text to be set Encryption.decrypt(self.cipher_text, self.shares, private_key) end |