Skip to content
Snippets Groups Projects
Commit fdcda4e5 authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

change hmac key message

parent 73641ca4
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ func (c *ConsentCode) String() string {
func (c *ConsentCode) GetState() string {
if c.state == "" {
c.state = hashUtils.HMACSHA512Str([]byte(c.r), []byte("state"))[:stateLen] + c.encodedInfo
c.state = hashUtils.HMACSHA512Str([]byte("state"), []byte(c.r))[:stateLen] + c.encodedInfo
}
return c.state
}
......@@ -32,7 +32,7 @@ func (s *State) Hash() string {
func (s *State) PollingCode() string {
if s.pollingCode == "" {
s.pollingCode = hashUtils.HMACSHA512Str([]byte(s.state), []byte("polling_code"))[:config.Get().Features.Polling.Len]
s.pollingCode = hashUtils.HMACSHA512Str([]byte("polling_code"), []byte(s.state))[:config.Get().Features.Polling.Len]
log.WithField("state", s.state).WithField("polling_code", s.pollingCode).Debug("Created polling_code for state")
}
return s.pollingCode
......
......@@ -8,8 +8,8 @@ import (
const (
MAJOR = 0
MINOR = 2
FIX = 0
DEV = false
FIX = 1
DEV = true
)
var version = fmt.Sprintf("%d.%d.%d", MAJOR, MINOR, FIX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment