KOKI025KOKI
XLDnaute Nouveau
Bonjour a tous , C'est possible je veux cryptée ce mot de pass la a l'aide d'une fonction de hachage SHA256
Password : karim
Voila la fonction :
Private Function SHA256(ByVal hach As String) As String
Dim ObjImplSerCry As New Security.Cryptography.SHA256CryptoServiceProvider
Dim ByteString() As Byte = System.Text.Encoding.ASCII.GetBytes(hach)
ByteString = ObjImplSerCry.ComputeHash(ByteString)
Dim finalString As String = Nothing
For Each bt As Byte In ByteString
finalString &= bt.ToString()
Next
Return finalString
End Function
Merci
Password : karim
Voila la fonction :
Private Function SHA256(ByVal hach As String) As String
Dim ObjImplSerCry As New Security.Cryptography.SHA256CryptoServiceProvider
Dim ByteString() As Byte = System.Text.Encoding.ASCII.GetBytes(hach)
ByteString = ObjImplSerCry.ComputeHash(ByteString)
Dim finalString As String = Nothing
For Each bt As Byte In ByteString
finalString &= bt.ToString()
Next
Return finalString
End Function
Merci