Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Monat, 1 Woche
Letzter Beitrag:
vor 1 Monat, 1 Woche
Beteiligte Autoren:
Fabrice Harari, ChristoK!

Encryption - Cross Platform (python)

Startbeitrag von ChristoK! am 12.08.2017 22:07

Greetings Gang...

Does anyone know how to encrypt something in WX and then decrypt in another language (specifically Python, but I'll take what I can get at this point) - and vice-versa

something like this
SomeVal is string = "pizza"
bufKey is Buffer = HashString(HA_MD5_128,"password")
sResult is buffer= CryptStandard(SomeVal, bufKey, cryptAES128)
nLen is int = Length(sResult)
sResult = BufferToHexa(sResult,1,128)
sResult = NoCharacter(sResult," ",sscAll)
sResult = NoCharacter(sResult,CR,sscAll)

now I just need the python end to be able to decrypt it (and need them to do the same sort of thing so that I can decrypt it)

if anyone has a better method I am open to that as well - this is currently one of the 2 banes of my existence



well, it seems that you know how to do it on the WX side, and as for python, you are asking on the wrong forum.
You should ask your question on how to decrypt a hexa to buffer, then buffer to string in AES128 on a python forum.

Best regards

von Fabrice Harari - am 14.08.2017 12:55
Thanks Fabrice...

so they don't need to use a specific library for decryption/encryption (ie there is standardised one that the other languages use)... sorry for the obviousness of the question, kinda new to the whole encryption/decryption thing (with other languages)


von ChristoK! - am 14.08.2017 13:18
Hi again

no they don't

it's the whole point of the "new" cryptstandard function. It uses standard algorithm implemented in a standard way, in order to be compatible with external tools doing the same thing.

You just need to choose the proper algorithm for the external tool (what is available on both sides) and of course know a little bit what you are doing, as there are encryption tricks (padding and such).

Best regards

von Fabrice Harari - am 14.08.2017 16:10
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.