Changeset

443:89526c890363

libs.hashes: Add back pure Lua sha1 implementation This one is slow so it gets to be first so it gets replaced if a better lib is found.
author Kim Alvefur <zash@zash.se>
date Wed, 17 Feb 2021 14:57:59 +0100
parents 442:b2ae91f4fec9
children 444:12c1be0044c6
files libs/hashes.lua squishy
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libs/hashes.lua	Mon Nov 23 23:49:42 2020 +0100
+++ b/libs/hashes.lua	Wed Feb 17 14:57:59 2021 +0100
@@ -10,6 +10,10 @@
 	if ok then f(pkg); end
 end
 
+with("util.sha1", function (sha1)
+	_M.sha1 = sha1.sha1;
+end);
+
 with("bgcrypto.md5", function (md5)
 	_M.md5 = md5.digest;
 	_M.hmac_md5 = md5.hmac.digest;
--- a/squishy	Mon Nov 23 23:49:42 2020 +0100
+++ b/squishy	Wed Feb 17 14:57:59 2021 +0100
@@ -3,6 +3,7 @@
 -- Verse-specific versions of libraries
 Module "util.encodings"		"libs/encodings.lua"
 Module "util.hashes"		"libs/hashes.lua"
+Module "util.sha1"		"util/sha1.lua"
 Module "lib.adhoc"              "libs/adhoc.lib.lua"
 Module "util.table" "libs/table.lua"