sha1 Calculate the sha1 hash of a string &warn.passwordhashing; &reftitle.description; stringsha1 stringstr boolraw_outputfalse Calculates the sha1 hash of str using the US Secure Hash Algorithm 1. &reftitle.parameters; str The input string. raw_output If the optional raw_output is set to &true;, then the sha1 digest is instead returned in raw binary format with a length of 20, otherwise the returned value is a 40-character hexadecimal number. &reftitle.returnvalues; Returns the sha1 hash as a string. &reftitle.examples; A <function>sha1</function> example ]]> &reftitle.seealso; sha1_file crc32 md5 hash crypt password_hash