standard.lib.cripto.sha1

sha1 is available since version 1.0.

Prototype:

string sha1(string str)

Parameters

str
[in] The string of which sha1 is needed

Description:

Calculate the sha1 hash of a string. Calculates the sha1 hash of str using the US Secure Hash Algorithm 1, and returns that hash. The hash is a 40-character hexadecimal number.

Return value:

Returns the sha1 hash as a string encapsulating a hex number.

Example
import standard.lib.cripto

class Main {
     function Main() {
          echo "The sha1 hash of 'test' is : "+sha1("test");
     }
}  

Results 
The sha1 hash of 'test' is : a94a8fe5ccb19ba61c4c0873d391e987982fbbd3