Calculate Hash of Secret

hash = key.hash(name, [format])

Calculate the SHA-1 hash of the secret name.

See auth.hash for format definitions.