You are here

public function KeyClient::create in Lockr 7.2

Creates a key in Lockr.

Parameters

int $key_size The size of key to create.:

Return value

string Returns the created key value.

File

vendor/lockr/lockr-client/src/KeyClient.php, line 67

Class

KeyClient

Namespace

Lockr

Code

public function create($key_size) {
  $body = $this->client
    ->get("/v1/generate-key?key_size={$key_size}");
  return base64_decode($body['key_value']);
}