Question: I'm writing a web app in ASP.Net that creates a licence key for a Windows app written in Delphi. For simplicity I'm going to use a email address and date.

I want to encrypt it in C# and email that info to the person then when the Windows app starts up the person enters in the encrypted string.

Every time the Windows app starts it checks that licence by decrypting it and comparing to todays date.

How can I do this to ensure the C# encryption will decrpyt succesffuly in Delphi?

Answer: 
[AES for Delphi](https://stackoverflow.com/questions/3872336/delphi-aes-library-rijndael-tested-with-kat-vectors) and [AES for C#](https://stackoverflow.com/questions/273452/c-implementations-of-aes-encryption).
Use the same encryption / decryption algorithm in both delphi and c#.

You can either find the code for an encryption algorithm for C# and then convert the code in the decryption algorithm into Delphi. Likely if you pick a popular encryption you'll be able to find both encryption and decryption algorithms already in many different languages.