refactoring: Masive refactor to build the V2
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package eventDemo.contexts.auth.infrastructure
|
||||
|
||||
import com.password4j.Hash
|
||||
import com.password4j.Password
|
||||
|
||||
internal fun hashPassword(password: String): Hash =
|
||||
Password.hash(password).addRandomSalt().withArgon2()
|
||||
|
||||
internal fun checkPassword(
|
||||
password: String,
|
||||
hash: Hash,
|
||||
): Boolean =
|
||||
Password.check(password, hash)
|
||||
Reference in New Issue
Block a user