Public Function Weinberger(ByVal Key As Byte()) As UInteger
Dim taille As Integer = Key.Length
Dim temp As UInteger = 0
Dim Res As UInteger = 0
Dim i As Integer = 0
While i < taille
Res = (Res * 16) + Key(i)
If Res > 268435456 Then
temp = (Res / 268435456) * 268435456
' 268435456 = 228
Res = Res + (temp / 16777216)
' 16777216 = 224
Res = Res - temp
End If
i += 1
End While
Return (Res) ' Mod M);
End Function