diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sha1.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sha1.go b/lib/sha1.go index f90bc53..bfe87b1 100644 --- a/lib/sha1.go +++ b/lib/sha1.go @@ -212,3 +212,9 @@ func Sha1Mac(secret, msg []byte) []byte { return Sha1(append(secret, msg...)) } +func Sha1MacVerify(secret, msg, mac []byte) bool { + if BytesEqual(Sha1(append(secret, msg...)), mac) { + return true + } + return false +} |