(password: string, hash: string)
| 148 | * Used to verify if the password matches the hash |
| 149 | */ |
| 150 | export const isHashMatch = async (password: string, hash: string) => { |
| 151 | if (password === "" || hash === "" || !hash.startsWith("$")) { |
| 152 | return false |
| 153 | } |
| 154 | return await argon2.verify(hash, password) |
| 155 | } |
| 156 | |
| 157 | /** |
| 158 | * Used to hash the password using the sha256 |
no outgoing calls
no test coverage detected