function webform_protected_downloads_create_hash in Webform Protected Downloads 7
Same name and namespace in other branches
- 6 webform_protected_downloads.module \webform_protected_downloads_create_hash()
Create a hash that users can use to access the download page
Parameters
string $row:
Return value
void
1 call to webform_protected_downloads_create_hash()
- webform_protected_downloads_process_submissions in ./
webform_protected_downloads.module - Process unprocessed webform submissions
File
- ./
webform_protected_downloads.module, line 837 - This file contains hook declarations and functions for the Webform Protected Downloads module.
Code
function webform_protected_downloads_create_hash() {
$seed = 'JvKnrQWPsThuJteNQAuH';
$hash = sha1(uniqid($seed . mt_rand(), true));
$hash = substr($hash, 0, 32);
return $hash;
}