Add _sha1_short function to Basic class. Currently calls crc32b. Will
later return 9 char long sha1 from string given. Will be used for the upcomging crc32b->sha1 switch in projects depending on this class system.
This commit is contained in:
@@ -1330,6 +1330,16 @@
|
||||
return $string;
|
||||
}
|
||||
|
||||
// METHOD: _sha1_short
|
||||
// PARAMS: string
|
||||
// RETURN: sha1 short (9 chars), but current calls _crc32b
|
||||
// DESC : replacement for _crc32b call
|
||||
public function _sha1_short($string)
|
||||
{
|
||||
// return substr(hash('sha1', $string), 0, 9);
|
||||
return $this->_crc32b($string);
|
||||
}
|
||||
|
||||
// METHOD: checkPHPVersion
|
||||
// PARAMS: $min_version: minimum version. in format x, x.y or x.y.z
|
||||
// $max_version: default empty, else in same format as min version
|
||||
|
||||
Reference in New Issue
Block a user