Changeset 754 for branches/1.1dev/lib/Utilities.inc.php
- Timestamp:
- Nov 15, 2021 10:58:50 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/lib/Utilities.inc.php
r753 r754 726 726 } 727 727 728 /* 729 * Generates a base-65-encoded sha512 hash of $string truncated to $length. 730 * 731 * @access public 732 * @param string $string Input string to hash. 733 * @param int $length Length of output hash string. 734 * @return string String of hash. 735 * @author Quinn Comendant <quinn@strangecode.com> 736 * @version 1.0 737 * @since 03 Apr 2016 19:48:49 738 */ 739 function hash64($string, $length=18) 740 { 741 $app =& App::getInstance(); 742 743 return mb_substr(preg_replace('/[^\w]/' . $app->getParam('preg_u'), '', base64_encode(hash('sha512', $string, true))), 0, $length); 744 } 745 728 746 /** 729 747 * Signs a value using md5 and a simple text key. In order for this
Note: See TracChangeset
for help on using the changeset viewer.