I have some cipher units written for Delphi 7.
These are fairly complex (at least for me). They contain methods (sorry functions and procedures) for the elliptic curve asymmetric cipher, The Rijndael symmetric cipher and the SHA-1 hash.

The system that uses these is using file downloads and uploads using Delphi 7 Isapi dlls. The system while working, is suffering congestion problems especially with uploads.

What I would like to use is WCF web services to handle data downloads and create local server files from parameters sent to the WCF web service on the server rather than perform uploads (the file contents is very small).

Writing the WCF should not be too much of a challenge but I need to use the delphi code to handle decryption/encryption.

I thought of writing a Win32 dll for the encryption logic called from C# WinForms (or maybe WPF) application.

Has anyone done this sort of thing before? I understand that value types are ok to exchange but reference types are a pain, this includes strings.

I have googled and there is a fair bit out there. Most of this is dealing with the pain of trying do it.

I only need to exchange ints, bools and strings. Nothing too fancy.
Has anyone some sample code they would be willing to share?

Also I would like be able call a method in the dll to store information in memory to be used by other method calls. This information is stored in an xml file and I would rather it be read and processed once rather than repeat this each time I need to use a method. In other words in using delphi dll, will it preserve state between method calls?

If I can't get the dll to work I will fall back on the crypographic support in the framework but this basically triples the effort required and data encrypted by the current system will not be compatible with the framework cryptographic routines.

Any help very much appreciated.




Reply via email to