Sub decrypt(strdecrypt As String) As String
si = 0
x1a2 = 0
icryp = 0
For fois = 1 To 16
cle(fois) = 0
Next fois
champ1 = "dsrfdswawwfyrewb"
lngchamp1 = Len(champ1)
For fois = 1 To lngchamp1
cle(fois) = Asc(Mid(champ1, fois, 1))
Next fois
champ1 = strdecrypt
lngchamp1 = Len(champ1)
For fois = 1 To lngchamp1
dcryp = Asc(Mid(champ1, fois, 1))
If (dcryp - &H61) >= 0 Then
dcryp = dcryp - &H61 ' to transform the letter to the 4 high bits of crest
If (dcryp >= 0) AND (dcryp <= 15) Then
dcryp = dcryp * 16
End If
End If
If (fois <> lngchamp1) Then
fois = fois + 1
End If
ecryp = Asc(Mid(champ1, fois, 1))
If (ecryp - &H61) >= 0 Then
ecryp = ecryp - &H61 ' to transform the letter to the 4 low bits of crest
If (ecryp >= 0) AND (ecryp <= 15) Then
crest = dcryp + ecryp
End If
End If
Assemble
If intercpt > 65535 Then
intercpt = intercpt - 65536
End If
cfc = (((intercpt / 256) * 256) - (intercpt Mod 256)) / 256
cfd = intercpt Mod 256
crest = crest Xor (cfc Xor cfd)
For compte = 1 To 16
cle(compte) = cle(compte) Xor crest
Next compte
decrypt = decrypt + Chr$(crest)
Next fois
End Sub