
( le but c'est de retourner la valeur hexadécimale dans une procédure )
merci de vos réponses


Code : Tout sélectionner
; Crypter une chaîne de caractères
;
String$ = "Hello voici un test pour AES"
StringMemorySize = StringByteLength(String$) + SizeOf(Character) ; Espace pour la chaîne et son caractère 'nul' de terminaison de chaîne
*CipheredString = AllocateMemory(StringMemorySize)
*DecipheredString = AllocateMemory(StringMemorySize)
If AESEncoder(@String$, *CipheredString, StringByteLength(String$), ?Key, 128, ?InitializationVector)
Debug "Codé : "+PeekS(*CipheredString) ; Attention, ça s'arrêtera sur le premier octet nul, uniquement à des fins de démonstration
AESDecoder(*CipheredString, *DecipheredString, StringByteLength(String$), ?Key, 128, ?InitializationVector)
Debug "Décodé : "+PeekS(*DecipheredString)
EndIf
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