Je suis fatigué ?
Ça vient de moi ?
C'est quoi le problème !!! ???
Ci dessous un exemple de l'aide en ligne à peine modifié.
Code : Tout sélectionner
keyBase$="key15468"
k$=MD5Fingerprint(@keyBase$,Len(keyBase$))
textBase$="12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
lBit.l=128
For x=1 To 100
String$ = Left(textBase$,x)
*CipheredString = AllocateMemory(Len(String$)+1)
*DecipheredString = AllocateMemory(Len(String$)+1)
;If AESEncoder(@String$, *CipheredString, Len(String$), ?Key, lBit, ?InitializationVector,#PB_Cipher_CBC)
; AESDecoder(*CipheredString, *DecipheredString, Len(String$), @k$, lBit, ?InitializationVector,#PB_Cipher_CBC)
;endif
If AESEncoder(@String$, *CipheredString, Len(String$), @k$, lBit, 0,#PB_Cipher_ECB)
AESDecoder(*CipheredString, *DecipheredString, Len(String$), @k$, lBit, 0,#PB_Cipher_ECB)
EndIf
If CompareMemory(*CipheredString,*DecipheredString,Len(string$))=0
Debug Str(x) + " - " + String$
EndIf
FreeMemory(*CipheredString)
FreeMemory(*DecipheredString)
Next
Debug "" ; breakPoint
DataSection
Key:
Data.b $06, $a9, $21, $40, $36, $b8, $a1, $5b, $51, $2e, $03, $d5, $34, $12, $00, $06
InitializationVector:
Data.b $3d, $af, $ba, $42, $9d, $9e, $b4, $30, $b4, $22, $da, $80, $2c, $9f, $ac, $41
EndDataSection