:sig
function password_hash(password : string) string

:params
password : the password to hash

:returns
a self-contained password encoding, or an empty string on failure

:content
`password_hash()` creates a password encoding with a random salt and current scrypt parameters.

Store the returned value exactly. Do not store an empty result.

The encoding includes its scrypt parameters. Its current parameter prefix is `$bearer$scrypt$65536$8$1$`. After a successful verification, compare the prefix with the parameters you require. Rehash the known password when the prefixes differ.

:example capy render
var encoded := password_hash("correct horse battery staple")
print(encoded != "", "\n")

:see-group
crypto
