Skip to content

Commit

Permalink
Fix keepass-cr-recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
toelke authored and droidmonkey committed Mar 11, 2022
1 parent 8f76ea3 commit e6a6ba7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/keepassxc-cr-recovery/main.go
Expand Up @@ -169,6 +169,14 @@ func main() {
log.Fatalf("couldn't read challenge: %s", err)
}

if len(challenge) < 64 {
padd := make([]byte, 64-len(challenge))
for i, _ := range padd {
padd[i] = byte(64-len(challenge))
}
challenge = append(challenge[:], padd[:]...)
}

mac := hmac.New(sha1.New, secret)
mac.Write(challenge)

Expand Down

0 comments on commit e6a6ba7

Please sign in to comment.