Search code examples
.netpythonencryptionaes

How to encrypt in Python and decrypt in a C#?


I am new-ish to encryption, and have seen many different libraries, however many of them were created many years ago, I am just wondering what people use today to encrypt in python and something that will work with it for decrypting in C# .net

I have looked into pycrypto, but from all the posts I have read, it seems like it hasn't been updated in a while (though it does seem very popular), and people have had a real struggle at getting it working with .net,

Any good suggestions? I don't suppose a library exists for this that has a .net & python version available? It really needs to be a reliable encryption such as AES.


Solution

  • For anyone in the future, I did some tests and found that this worked perfectly for my purposes, the silverlight example can pretty much be directly ported to C#.

    Uses pycrypto & System.Security.Cryptography

    http://japrogbits.blogspot.co.nz/2011/02/using-encrypted-data-between-python-and.html