A C plugin for ARO that provides various hash functions.
aro add git@github.com:arolang/plugin-c-hash.gitmakeOr manually:
clang -O2 -fPIC -dynamiclib -o libhash_plugin.dylib src/hash_plugin.cComputes a simple 32-bit hash of the input string.
Input:
data(string): String to hash
Output:
hash: 8-character hex stringalgorithm: "simple"input: Original input string
Computes a DJB2 64-bit hash of the input string.
Input:
data(string): String to hash
Output:
hash: 16-character hex stringalgorithm: "djb2"input: Original input string
Computes an FNV-1a 64-bit hash of the input string.
Input:
data(string): String to hash
Output:
hash: 16-character hex stringalgorithm: "fnv1a"input: Original input string
(* Hash a password *)
(Hash Password: Security) {
<Extract> the <password> from the <request: password>.
<Hash> the <hashed> with <password>.
<Return> an <OK: status> with <hashed>.
}
MIT