diff --git a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/hasPassword.kt b/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/hasPassword.kt deleted file mode 100644 index 2f46a9d..0000000 --- a/What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/hasPassword.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.example.what_the_fantasy.ui.components - -import java.security.MessageDigest - -fun hashPassword(password: String): String { - // SHA-256 - val digest = MessageDigest.getInstance("SHA-256") - - // Convertir mdp en bytes et appliquer le hash - val hashedBytes = digest.digest(password.toByteArray()) - - // Convertir le tableau de bytes en une chaîne hexadécimale - return hashedBytes.joinToString("") { "%02x".format(it) } -} \ No newline at end of file