public function WardenAPI::getPublicKey in Warden 6
Same name and namespace in other branches
- 7 warden_api.inc \WardenAPI::getPublicKey()
Get the public key.
3 calls to WardenAPI::getPublicKey()
- WardenAPI::decrypt in ./
warden_api.inc - Decrypt a message which was encrypted with the Warden private key.
- WardenAPI::encrypt in ./
warden_api.inc - Encrypt a plaintext message.
- WardenAPI::isValidWardenToken in ./
warden_api.inc - Check the validity of a token sent from Warden.
File
- ./
warden_api.inc, line 47 - The API for communicating with the Warden server application.
Class
- WardenAPI
- @file The API for communicating with the Warden server application.
Code
public function getPublicKey() {
if (empty($this->wardenPublicKey)) {
$result = $this
->request('/public-key');
$this->wardenPublicKey = base64_decode($result->data);
}
return $this->wardenPublicKey;
}