Last Modified October 2, 2026
- Home
- Guides
- StreamLined Activation
- Authenticate DNA Library
StreamLined Activation - Authenticate the DNA Library
To ensure that your Application is working with a valid / authenticated DNA Library, versus an illegitimate or hacked Library,
you can authenticate the DNA Library as follows:
compute the MD5 or SHA1 Hash Code of the DNA Library (ex: DNA.DLL) file on the user’s device
(usually located in the same directory as the application)
compare it to the known MD5 or SHA1 code for the specific version of the DNA Library you are using
If it does not match, it is not a valid DNA Library, exit the program.
Authentication of the DNA Library is one element of an overall strategy to protect your App from hacking. On some OS's that
enforce Application signing (ex: Mac OS, Android), this step is optional.
See Hacking Protection
for more insights into an overall strategy.
Important Notes
The latest DNA Library (ex: DNA.DLL) MD5 and SHA1 Hash Code is available in the
ReadMe file that is in cluded in the DNA Library ZIP Package,
available from the DNA Control Panel under RESOURCES -> DNA Libraries
You can find source code examples for software_DNA implementation and for the MD5 algorithm ("MD5Print")
for different languages in the DNA Control Panel under RESOURCES -> DNA Libraries or
RESOURCES -> Code Samples)
.NET code samples use the built-in MD5 or SHA1 functions of the .NET framework
MD5 or SHA1 Hash Algorithm
You must use the SHA1 Hash algorithm if your Users may be subject to FIPS (US Government) compliance. Do not include or use the MD5
Hash algorithm in such situations to prevent your App being blocked from running on Windows computers.
In all other situations, you can use either the MD5 or SHA1 Hash algorithm to authenticate the DNA Library.
Authentication of the DNA Library by verifying the MD5 Hash
Highlighted lines indicate where additional code is required or needs to be modified.
// definition of constants unShuffledMD5
// 64-bit DLL MD5 - use the correct MD5 for the DNA Library used
//
#define unShuffledMD5 "5a304c147fca8fd97d41cfdd149b92c7"
// at start-up of the application
//
// authenticate the DNA.DLL’s MD5
//
// declare variables used in MD5 check
char* MD5DigestHex;
MD5 md5 ;
MD5DigestHex = md5.digestFile( "DNA.DLL" );
if (strcmp((const char *)MD5DigestHex,unShuffledMD5)!=0)
{
// invalid MD5
// - quit the application
// - show error message (optional)
}