Class: Apertur::Resources::Encryption

Inherits:
Object
  • Object
show all
Defined in:
lib/apertur/resources/encryption.rb

Overview

Retrieve server-side encryption keys.

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ Encryption

Returns a new instance of Encryption.

Parameters:



8
9
10
# File 'lib/apertur/resources/encryption.rb', line 8

def initialize(http)
  @http = http
end

Instance Method Details

#get_server_keyHash

Get the server’s public encryption key.

The returned key is used for client-side image encryption before upload.

Returns:

  • (Hash)

    server key details including the PEM-encoded public key



17
18
19
# File 'lib/apertur/resources/encryption.rb', line 17

def get_server_key
  @http.request(:get, "/api/v1/encryption/server-key")
end