docs: publish password hashing APIs

This commit is contained in:
udo
2026-07-13 19:47:06 +00:00
parent 4414972079
commit 0187bb60cf
6 changed files with 67 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
:sig
String password_hash(String password)
:params
password : password bytes to hash
return value : self-contained scrypt encoding, or an empty string on failure
:content
Creates a password credential with a cryptographically random salt and UCE's current bounded scrypt parameters. Store the returned encoding exactly as produced. An empty result means hashing failed; abort the credential write and report an operational error instead of storing it.
:example
String encoded = password_hash("correct horse battery staple");
print(encoded != "" && password_verify("correct horse battery staple", encoded) ? "valid" : "failed", "\n");
:see
>sys
password_verify
password_needs_rehash