Returns the SHA-1 of a value, for one of the purposes a specification fixes it for.
a key of SHA1_PURPOSES
the bytes, or a string read as UTF-8
hex, base64 or base64url; a Buffer when absent
hex
base64
base64url
the digest
Error for a purpose not in the list
Returns the SHA-1 of a value, for one of the purposes a specification fixes it for.