:sig
String sha1(String s, bool as_binary = false)

:params
s : data to be hashed
as_binary : when set to false, returns hash in hexadecimal notation (defaults to false)
return value : the resulting hash value

:see
>noise

:content
Returns the SHA-1 hash of `s`.

When `as_binary` is `false`, the hash is returned as hexadecimal text. When it is `true`, the raw binary hash bytes are returned.

## Related Concepts

- PHP: `sha1()`
- JavaScript / Node.js: Node `crypto.createHash("sha1")` or browser `SubtleCrypto` wrappers
