Diff

libs/hashes.lua @ 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
parent 422:ff59e4a1a600
child 484:5e2978489c95
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;