SearchApiAcquiaCrypt.php in Acquia Search for Search API 7.2
File
includes/v3/SearchApiAcquiaCrypt.phpView source
<?php
/**
* Class SearchApiAcquiaCrypt.
*/
class SearchApiAcquiaCrypt {
/**
* Generates random bytes.
*
* @param int $count
* The number of characters (bytes) to return in the string.
*
* @return string
* String of random bytes.
*/
public static function randomBytes($count) {
$random_bytes = drupal_random_bytes($count);
$nonce = str_replace([
'+',
'/',
'=',
], [
'-',
'_',
'',
], base64_encode($random_bytes));
return $nonce;
}
}
Classes
Name | Description |
---|---|
SearchApiAcquiaCrypt | Class SearchApiAcquiaCrypt. |