As promised, I have attached a VB6 Cryptography Test program originally developed in C++ by:
Michael Jung 2004
Juan Lang 2006
Vijay Kiran Kamuju 2007
The original C++ code is included as TestC++.txt.
Not all functions behave exactly the same as predicted, and much of that I attribute to the fact that Encryption and Decryption routines are done using strings rather than byte arrays. The reason for doing this is that in VB6, data is usually sent and received as string information.
The Test NULL Provider routine has not been implemented at all. Of the first 4 tests that I converted, 3 of them did not behave as predicted. The bulk of the routine seemed to be based on testing for failures rather than productive code, so I abandoned the effort.
I also made no attempt to provide support for XP and older operating systems as the original authors did. There were a lot of system calls that just were not supported by these older systems, and I had no way of testing them.
Most of the system calls have built in error trapping, and would not be present in this format in final working code. But these routines are built as demonstration test code, and a full description of the error is useful. A full list of the 0x80090000 level errors is included in the module.
I am by no means a Cryptographic expert, but I will attempt to address any questions.
J.A. Coutts
Michael Jung 2004
Juan Lang 2006
Vijay Kiran Kamuju 2007
The original C++ code is included as TestC++.txt.
Not all functions behave exactly the same as predicted, and much of that I attribute to the fact that Encryption and Decryption routines are done using strings rather than byte arrays. The reason for doing this is that in VB6, data is usually sent and received as string information.
The Test NULL Provider routine has not been implemented at all. Of the first 4 tests that I converted, 3 of them did not behave as predicted. The bulk of the routine seemed to be based on testing for failures rather than productive code, so I abandoned the effort.
I also made no attempt to provide support for XP and older operating systems as the original authors did. There were a lot of system calls that just were not supported by these older systems, and I had no way of testing them.
Most of the system calls have built in error trapping, and would not be present in this format in final working code. But these routines are built as demonstration test code, and a full description of the error is useful. A full list of the 0x80090000 level errors is included in the module.
I am by no means a Cryptographic expert, but I will attempt to address any questions.
J.A. Coutts