class SearchApiAcquiaCrypt in Acquia Search for Search API 7.2
Class SearchApiAcquiaCrypt.
Hierarchy
- class \SearchApiAcquiaCrypt
Expanded class hierarchy of SearchApiAcquiaCrypt
File
- includes/
v3/ SearchApiAcquiaCrypt.php, line 6
View source
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SearchApiAcquiaCrypt:: |
public static | function | Generates random bytes. |