function drupal_random_key

cis7 bootstrap.inc drupal_random_key($byte_count = 32)
cle7 bootstrap.inc drupal_random_key($byte_count = 32)
elmsmedia7 bootstrap.inc drupal_random_key($byte_count = 32)
icor7 bootstrap.inc drupal_random_key($byte_count = 32)
meedjum_blog7 bootstrap.inc drupal_random_key($byte_count = 32)
mooc7 bootstrap.inc drupal_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 4 * $byte_count.

11 calls to drupal_random_key()
drupal_get_private_key in includes/common.inc
Ensures the private key variable used to generate tokens is set.
drupal_prepare_form in includes/form.inc
Prepares a structured form array.
drupal_rebuild_form in includes/form.inc
Constructs a new $form from the information in $form_state.
drupal_session_initialize in includes/session.inc
Initializes the session handler, starting a session if needed.
drupal_session_regenerate in includes/session.inc
Called when an anonymous user becomes authenticated or vice-versa.

... See full list

File

includes/bootstrap.inc, line 1945
Functions that need to be loaded on every Drupal request.

Code

function drupal_random_key($byte_count = 32) {
  return drupal_base64_encode(drupal_random_bytes($byte_count));
}