diff options
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r-- | stdlib/source/program/aedifex/hash.lux | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux index d45c8bb6e..e0548920f 100644 --- a/stdlib/source/program/aedifex/hash.lux +++ b/stdlib/source/program/aedifex/hash.lux @@ -21,7 +21,7 @@ ["n" nat] ["[0]" i64]]] [type - abstract]]]) + [abstract {"-" pattern}]]]]) ... TODO: Replace with pure-Lux implementations of these algorithms ... https://en.wikipedia.org/wiki/SHA-1#SHA-1_pseudocode @@ -42,14 +42,14 @@ (def: .public data (All (_ h) (-> (Hash h) Binary)) - (|>> :representation)) + (|>> representation)) (template [<name> <kind> <algorithm>] [(def: .public (<name> value) (-> Binary (Hash <kind>)) (|> (java/security/MessageDigest::getInstance [(ffi.as_string <algorithm>)]) (java/security/MessageDigest::digest [value]) - :abstraction))] + abstraction))] [sha-1 ..SHA-1 "SHA-1"] [md5 ..MD5 "MD5"] @@ -102,7 +102,7 @@ [(def: .public (<name> data) (-> Binary (Try (Hash <kind>))) (if (n.= <size> (binary.size data)) - {try.#Success (:abstraction data)} + {try.#Success (abstraction data)} (exception.except <exception> [data])))] [as_sha-1 SHA-1 ..sha-1::size ..not_a_sha-1] @@ -153,7 +153,7 @@ [(implementation: .public <codec> (Codec Text (Hash <hash>)) - (def: encoded (|>> :representation ..encoded)) + (def: encoded (|>> representation ..encoded)) (def: decoded (..decoded <nat> <constructor>)))] [sha-1_codec SHA-1 ..sha-1::size ..as_sha-1] @@ -165,6 +165,6 @@ (def: (= reference subject) (# binary.equivalence = - (:representation reference) - (:representation subject)))) + (representation reference) + (representation subject)))) ) |