Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sha alg name in error message and go doc #571

Merged
merged 4 commits into from
Mar 29, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions token/hmac/hmacsha.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
*/

// Package hmac is the default implementation for generating and validating challenges. It uses HMAC-SHA256 to
// Package hmac is the default implementation for generating and validating challenges. It uses HMAC-SHA512_256 to
vineet-garg marked this conversation as resolved.
Show resolved Hide resolved
// generate and validate challenges.

package hmac
Expand Down Expand Up @@ -64,7 +64,7 @@ func (c *HMACStrategy) Generate() (string, string, error) {
defer c.Unlock()

if len(c.GlobalSecret) < minimumSecretLength {
return "", "", errors.Errorf("secret for signing HMAC-SHA256 is expected to be 32 byte long, got %d byte", len(c.GlobalSecret))
return "", "", errors.Errorf("secret for signing HMAC-SHA512_256 is expected to be 32 byte long, got %d byte", len(c.GlobalSecret))
}

var signingKey [32]byte
Expand Down