You are here

public function KeyClient::get in Lockr 7.2

Same name and namespace in other branches
  1. 7 src/Lockr/KeyClient.php \Lockr\KeyClient::get()

Gets a key from Lockr.

Parameters

string $name The key name.:

Return value

string The key.

File

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

Class

KeyClient

Namespace

Lockr

Code

public function get($name) {
  $body = $this->client
    ->get($this
    ->uri($name));
  if (null !== $this->encoded) {
    return MultiKeyWrapper::decrypt($body['key_value'], $this->encoded);
  }
  return $body['key_value'];
}