diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/aedifex/hash.lux | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index 093f5fbe4..30b0cdcee 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -1,25 +1,25 @@ (.using - [library - [lux "*" - ["[0]" ffi {"+" import:}] - [abstract - [codec {"+" Codec}] - [equivalence {"+" Equivalence}] - [monad {"+" do}]] - [control - ["[0]" try {"+" Try}] - ["[0]" exception {"+" exception:}]] - [data - ["[0]" binary {"+" Binary}] - ["[0]" text - ["%" format {"+" Format format}] - ["[0]" encoding]]] - [math - [number - ["n" nat] - ["[0]" i64]]] - [type - abstract]]]) + [library + [lux "*" + ["[0]" ffi {"+" import:}] + [abstract + [codec {"+" Codec}] + [equivalence {"+" Equivalence}] + [monad {"+" do}]] + [control + ["[0]" try {"+" Try}] + ["[0]" exception {"+" exception:}]] + [data + ["[0]" binary {"+" Binary}] + ["[0]" text + ["%" format {"+" Format format}] + ["[0]" encoding]]] + [math + [number + ["n" nat] + ["[0]" i64]]] + [type + abstract]]]) ... TODO: Replace with pure-Lux implementations of these algorithms ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode @@ -44,7 +44,7 @@ (template [<name> <kind> <algorithm>] [(def: .public (<name> value) (-> Binary (Hash <kind>)) - (|> (java/security/MessageDigest::getInstance [<algorithm>]) + (|> (java/security/MessageDigest::getInstance [(ffi.as_string <algorithm>)]) (java/security/MessageDigest::digest [value]) :abstraction))] |