I have an encrypted license.lic file, which is encrypted using private pem file in php. Below is the code:
and now there is C# code by using encrypted code is getting decrypted using public pem file:
Now I want to do the same decryption functionality in python. In simple words whatever C# code is doing I want to do the same in python. I only want to decrypt the license.lic file using python.
I have tried to that and took many samples from chatgpt, but got no luck. I get this error:
‘cryptography.hazmat.bindings._rust.openssl.rsa.RSAPublicKey’ object has no attribute ‘decrypt’ python public key
At the end chatgpt says:
Using private key we encrypts the data and using same private key we decrypt the data but in our case C# is using public pem file to decrypt the data so why python can not use the same public pem file to decrypt the data?
Anyone please help me out, and thanks for looking at it.
2