hash-pin #235

Merged
lash merged 15 commits from hash-pin into master 2025-01-03 09:25:26 +01:00
Showing only changes of commit 82b4365d16 - Show all commits

View File

@ -1047,7 +1047,14 @@ func TestAuthorize(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err = store.WriteEntry(ctx, sessionId, common.DATA_ACCOUNT_PIN, []byte(accountPIN))
// Hash the PIN
hashedPIN, err := common.HashPIN(accountPIN)
if err != nil {
logg.ErrorCtxf(ctx, "failed to hash temporaryPin", "error", err)
t.Fatal(err)
}
err = store.WriteEntry(ctx, sessionId, common.DATA_ACCOUNT_PIN, []byte(hashedPIN))
if err != nil {
t.Fatal(err)
}