Class: Apertur::Resources::Encryption
- Inherits:
-
Object
- Object
- Apertur::Resources::Encryption
- Defined in:
- lib/apertur/resources/encryption.rb
Overview
Retrieve server-side encryption keys.
Instance Method Summary collapse
-
#get_server_key ⇒ Hash
Get the server’s public encryption key.
-
#initialize(http) ⇒ Encryption
constructor
A new instance of Encryption.
Constructor Details
#initialize(http) ⇒ Encryption
Returns a new instance of Encryption.
8 9 10 |
# File 'lib/apertur/resources/encryption.rb', line 8 def initialize(http) @http = http end |
Instance Method Details
#get_server_key ⇒ Hash
Get the server’s public encryption key.
The returned key is used for client-side image encryption before upload.
17 18 19 |
# File 'lib/apertur/resources/encryption.rb', line 17 def get_server_key @http.request(:get, "/api/v1/encryption/server-key") end |