PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Encryption - Cross Platform (python)
Encryption - Cross Platform (python)
Débuté par ChristoK!, 13 aoû. 2017 00:07 - 5 réponses
Posté le 13 août 2017 - 00: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
Posté le 14 août 2017 - 14:55
Hi

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
Posté le 14 août 2017 - 15:18
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)

C!!!
Posté le 14 août 2017 - 18:10
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
Posté le 20 janvier 2018 - 00:57
I think the general process for this kind of work is:
1- Ensure that the encrypted file is handlable in the new language. For example do you have an encrypted .txt file?
2- Search for the functions in your new language which can perform the job.
3- Code up.

So if you generate a file format specific to Windev (a supposition), another language would not be able to handle it.
And vice-versa.
Membre enregistré
3 messages
Posté le 20 janvier 2018 - 01:03
I think the general process for this kind of work is:
1- Ensure that the encrypted file is handleable in the new language. For example, do you have an encrypted .txt file?
2- Search for the functions in your new language which can perform the job.
3- Code up.

So if you generate a file format specific to Windev (a supposition), another language would not be able to handle it.
And vice-versa.

--
PRACTICE MAKES PERFECT !