fix: use string literal for SHA-256 algorithm instead of undefined constant

This commit is contained in:
Patrick Britton 2026-02-16 23:43:38 -06:00
parent a5f20439bf
commit 96c0348d3a

View file

@ -50,7 +50,7 @@ func (s *AltchaService) VerifyToken(token, remoteIP string) (*AltchaResponse, er
func (s *AltchaService) GenerateChallenge() (map[string]interface{}, error) { func (s *AltchaService) GenerateChallenge() (map[string]interface{}, error) {
// Generate challenge using official ALTCHA library // Generate challenge using official ALTCHA library
options := altcha.ChallengeOptions{ options := altcha.ChallengeOptions{
Algorithm: altcha.AlgorithmSHA256, Algorithm: "SHA-256",
MaxNumber: 100000, MaxNumber: 100000,
SaltLength: 12, SaltLength: 12,
HMACKey: s.secretKey, HMACKey: s.secretKey,