August 2003
Beginner to intermediate
600 pages
12h 57m
English
The ManagedCryptoAPI class includes a method called ManagedComputeHash, which computes a hash for an array of bytes. To use ManagedComputeHash, follow these steps:
1. | Acquire an instance of the ManagedCryptoAPI class. |
2. | Use the ManagedCryptoAPI instance to acquire a handle to a key container within a CSP. |
3. | Pass the context handle, the array of bytes for which to compute a hash, and a reference to an Int32 to the ManagedComputeHash method. |
4. | ManagedComputeHash returns an array of bytes holding the hash bytes and sets the reference to the Int32 to the number of bytes in the returned array that hold valid hash data. |
Listing 14.3, taken from the sample application ComputeHash, demonstrates computing a hash with ManagedCryptoAPI ...
Read now
Unlock full access