Generating Hashes of Strings and Messages

When you're working with encryption, you'll often find yourself creating hashes. A hash is sort of like a fingerprint of a message or file. No two files or messages will produce hashes that are reliably the same, so the hashes can be used to determine whether a message or file has been modified or otherwise tampered with. You'll also use hashes generated from passwords or other sources to derive encryption keys.

Creating a Hash Object

Before you can do anything else, you have to create a hash object. This hash object will hold the hashes of data or session keys, or even combinations of hashes, depending on what your application needs might be. You create an empty hash object by using the CryptCreateHash ...

Get Developing Secure Applications with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.