From 9a5ceb0c3a37abcbbcd0707894b7829a76ec3b7e Mon Sep 17 00:00:00 2001 From: Kentin BRONGNIART Date: Fri, 28 Feb 2025 14:24:18 +0100 Subject: [PATCH] correction erreur de merge --- .../what_the_fantasy/ui/components/hasPassword.kt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 What_The_Fantasy/app/src/main/java/com/example/what_the_fantasy/ui/components/hasPassword.kt 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