1 bootstrap.inc backdrop_random_key($byte_count = 32)

Returns a URL-safe, base64 encoded string of highly randomized bytes (over the full 8-bit range).

Parameters

$byte_count: The number of random bytes to fetch and base64 encode.

Return value

string: The base64 encoded result will have a length of up to ceil($byte_count * 4 / 3).

File

core/includes/bootstrap.inc, line 2550
Functions that need to be loaded on every Backdrop request.

Code

function backdrop_random_key($byte_count = 32) {
  return backdrop_base64_encode(backdrop_random_bytes($byte_count));
}