Monday, October 8, 2012

Conversion Functions for Hash (SHA1) and Hex

Problem Statement: During a recent project there was a need to encrypt the data to be sent to target application using SHA1 algorithm. There was a need to develop some kind of function which can achieve this objective.

SolutionDuring this process i used Visual Studio 2010 to develop the required functions using c++ code and then export these functions using dll.

This dll can be called in your VUGen script to encode the string using SHA1 algorithm and send it back to you (this generates the code in base-64).

Also this dll has some more basic utility like converting a string to hex and vice-versa. The usage of the functions can be seen in the screenshot below:


Hope this is helpful to you in your projects; if anyone needs any custom functions then i can probably add them later into this dll.

PS: I can't post the dll here in this post due to option restrictions; you can mail me if you need it then i can send you the dll.