diff options
author | siddharth <s@ricketyspace.net> | 2021-10-05 20:36:40 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2021-10-05 20:36:40 -0400 |
commit | df94df85159928d7b8a094673a0a796f4f23e0ff (patch) | |
tree | bfae5708dc672e38c51bf96505cbdb7d0ad396eb /lib | |
parent | ba0424eb59128714d426b4692105ec86d50520dc (diff) |
lib: add Sha1Mac
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sha1.go | 5 |
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...)) +} + |