Skip to content
This repository has been archived by the owner on Jun 5, 2021. It is now read-only.

Commit

Permalink
hmac: re-vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Aug 11, 2019
1 parent d56b7d6 commit e946255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/hmac/hmac.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The receiver verifies the hash by recomputing it using the same key.
Receivers should be careful to use Equal to compare MACs in order to avoid
timing side-channels:
// CheckMAC reports whether messageMAC is a valid HMAC tag for message.
func CheckMAC(message, messageMAC, key []byte) bool {
// ValidMAC reports whether messageMAC is a valid HMAC tag for message.
func ValidMAC(message, messageMAC, key []byte) bool {
mac := hmac.New(sha256.New, key)
mac.Write(message)
expectedMAC := mac.Sum(nil)
Expand Down

0 comments on commit e946255

Please sign in to comment.