1 file.module file_get_download_token($file)

File

core/modules/file/file.module, line 2100
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_get_download_token($file) {
  // Return the first eight characters.
  return substr(backdrop_hmac_base64("file/$file->fid/download:" . $file->uri, backdrop_get_private_key() . backdrop_get_hash_salt()), 0, 8);
}