You are here

function _webform_entity_print_token_generate in Webform 6.x

Generate a unique and secure token for a URI.

Parameters

string $uri: A URI.

Return value

string A unique and secure token for a URI.

3 calls to _webform_entity_print_token_generate()
WebformEntityPrintFunctionalTest::testEntityPrint in modules/webform_entity_print/tests/src/Functional/WebformEntityPrintFunctionalTest.php
Test entity print.
webform_entity_print_preprocess_entity_print in modules/webform_entity_print/webform_entity_print.module
Implements hook_preprocess_entity_print().
webform_entity_print_webform_submission_access in modules/webform_entity_print/webform_entity_print.module
Implements hook_webform_submission_access().

File

modules/webform_entity_print/webform_entity_print.module, line 339
Provides Entity Print (PDF) integration.

Code

function _webform_entity_print_token_generate($uri) {
  $path = parse_url($uri, PHP_URL_PATH);
  return Crypt::hmacBase64('webform-entity-print-path-' . $path, Settings::getHashSalt());
}