function drupal_base64_encode

Same name and namespace in other branches
  1. 7.x drupal-7.x/includes/bootstrap.inc \drupal_base64_encode()

Returns a URL-safe, base64 encoded version of the supplied string.

Parameters

$string: The string to convert to base64.

Return value

string

1 call to drupal_base64_encode()
drupal_random_key in drupal-6.x/includes/bootstrap.inc
Returns a URL-safe, base64 encoded string of highly randomized bytes (over the full 8-bit range).

Archivo

drupal-6.x/includes/bootstrap.inc, line 1359
Functions that need to be loaded on every Drupal request.

Código

function drupal_base64_encode($string) {
  $data = base64_encode($string);
  // Modify the output so it's safe to use in URLs.
  return strtr($data, array('+' => '-', '/' => '_', '=' => ''));
}