summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2021-10-05 20:36:40 -0400
committersiddharth <s@ricketyspace.net>2021-10-05 20:36:40 -0400
commitdf94df85159928d7b8a094673a0a796f4f23e0ff (patch)
treebfae5708dc672e38c51bf96505cbdb7d0ad396eb
parentba0424eb59128714d426b4692105ec86d50520dc (diff)
lib: add Sha1Mac
-rw-r--r--lib/sha1.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/sha1.go b/lib/sha1.go
index 3596160..f90bc53 100644
--- a/lib/sha1.go
+++ b/lib/sha1.go
@@ -207,3 +207,8 @@ func Sha1(m []byte) []byte {
return d
}
+
+func Sha1Mac(secret, msg []byte) []byte {
+ return Sha1(append(secret, msg...))
+}
+