You are here

protected function TfaTrustedBrowser::generateBrowserId in TFA Basic plugins 7

Generate a random value to identify the browser.

Return value

string

2 calls to TfaTrustedBrowser::generateBrowserId()
TfaTrustedBrowser::finalize in includes/tfa_trusted_browser.inc
TfaTrustedBrowserSetup::submitSetupForm in includes/tfa_trusted_browser.inc
@copydoc TfaSetupPluginInterface::submitSetupForm()

File

includes/tfa_trusted_browser.inc, line 92
classes for TFA basic plugin

Class

TfaTrustedBrowser
Class TfaTrustedBrowser

Code

protected function generateBrowserId() {
  $id = base64_encode(drupal_random_bytes(32));
  return strtr($id, array(
    '+' => '-',
    '/' => '_',
    '=' => '',
  ));
}