Skip to content

Commit

Permalink
revert default case when matching sha algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ci42 committed Mar 6, 2023
1 parent 886b159 commit 2262add
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hash/hash_comparator.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,8 @@ func decodeSSHAHash(encodedHash string) (hasher string, salt, hash []byte, err e
hasher = "sha512"
index_of_hash_begin = 9
index_of_salt_begin = 64
default:
return "", nil, nil, ErrInvalidHash
}

decoded, err := base64.StdEncoding.DecodeString(string(encodedHash[index_of_hash_begin:]))
Expand Down

0 comments on commit 2262add

Please sign in to comment.