You are here

protected function Client::getNonce in Acquia Connector 8.2

Same name and namespace in other branches
  1. 8 src/Client.php \Drupal\acquia_connector\Client::getNonce()
  2. 3.x src/Client.php \Drupal\acquia_connector\Client::getNonce()

Get a random base 64 encoded string.

Return value

string Random base 64 encoded string.

1 call to Client::getNonce()
Client::buildAuthenticator in src/Client.php
Build authenticator to sign requests to the Acquia.

File

src/Client.php, line 412

Class

Client
Acquia connector client.

Namespace

Drupal\acquia_connector

Code

protected function getNonce() {
  return Crypt::hashBase64(uniqid(mt_rand(), TRUE) . random_bytes(55));
}