machaine =crypto.EncrypterChaine(machaine) retour = machaine dim decrypto as New ElgAESCrypt("maclé") retour =decrypto.DecrypterChaine(retour)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPublic Function hash(ByVal StringToHash As String) As String Dim myEncoder As New System.Text.UTF32Encoding Dim Key() As Byte = Convert.FromBase64String("macle") Dim XML() As Byte = myEncoder.GetBytes(StringToHash) Dim myHMACSHA256 As New System.Security.Cryptography.HMACSHA256(Key) Dim HashCode As Byte() = myHMACSHA256.ComputeHash(XML) Return Convert.ToBase64String(HashCode) End Function
if decrypto.encrypter(hash("test")) = retour then 'retour contient la chaine crypté du fichier ini. msgbox("ok") else msgbox("erreur") endif