From df94df85159928d7b8a094673a0a796f4f23e0ff Mon Sep 17 00:00:00 2001 From: siddharth Date: Tue, 5 Oct 2021 20:36:40 -0400 Subject: lib: add Sha1Mac --- lib/sha1.go | 5 +++++ 1 file changed, 5 insertions(+) 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...)) +} + -- cgit v1.2.3