• Welcome to Simple Machines Community Forum. Please login or sign up.



Returns the sha1 hash of the specified string.


string sha1 (string $str)

Parameter $str

Expected type: String
Description: An unencrypted string

Return value

Expected type: String
Description: The sha1 hash of the given string


  • Basically equivalent to the PHP function of the same name
  • Only defined in PHP 4.2.x or lower (native PHP version added in PHP 4.3.0)
  • If the mhash extension is detected, SMF will use it instead
  • Uses the additional sha1 functions defined here to calculate the hash
  • Additional sha1 functions are not documented as they have no significant meaning to the average user