Use StringToCharArray with explicit count parameter to exclude terminal zero from the resulting byte array.
StringToCharArray(text, src, 0, StringLen(text)) ;
amrali:
Use StringToCharArray with explicit count parameter to exclude terminal zero from the resulting byte array.
@amrali Thank you it solved the problem , encryption/decryption in mql4 is really messing with my head , its so much simpler in python and php and other languages but quite a bit of limitations in mql4
Use StringToCharArray with explicit count parameter to exclude terminal zero from the resulting byte array.
amrali #:
Use StringToCharArray with explicit count parameter to exclude terminal zero from the resulting byte array.
thanks....
Use StringToCharArray with explicit count parameter to exclude terminal zero from the resulting byte array.
I am trying to decode an encrypted string (Encryption was done using php )
String was encrypted using AES-256-ECB with Padding mode as Zeros.
and and if i encrypt the string in the mql4 using the same key , i get exact same encrypted string as the one i get from php.
initially i was struggling to get the same encrypted string but finally managed to generate the same encrypted string on both sides
but now CryptDecode is causing issues:
I am getting :
Error: 4029
Decoded data: size=0, string=''
Any advice regarding this issue ?