aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-03-16 08:37:23 -0400
committerEduardo Julian2022-03-16 08:37:23 -0400
commitbf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 (patch)
tree49683a62ae8e110c62b42a9a6386bb2ddb3c47c6 /stdlib/source/program/aedifex/hash.lux
parentd710d9f4fc098e7c243c8a5f23cd42683f13e07f (diff)
De-sigil-ification: prefix :
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r--stdlib/source/program/aedifex/hash.lux14
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))))
)