Oracle Consulting Oracle Training Oracle Support Development
Oracle Books
SQL Server Books
IT Books
Job Interview Books
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle


Privacy Policy


  SQL Server Tips by Burleson

MS CryptoAPI based Hash Algorithm Implementations

To initialize MS CryptoAPI we first must acquire a so-called ‘Cryptography Service Provider (CSP)’. A CSP is a software module, which integrates with the CryptoAPI to provide cryptography functionality to client applications. This concept is similar to the approach taken by printer manufacturers in Windows. The manufacturer of a printer or Microsoft themselves develop a driver which talks directly to the printer hardware and then presents a standard interface to Windows and client applications. This allows developers to develop to the standard printer API’s. This allows Windows applications to support any printer installed on Windows without the need for additional application code. Unlike Printer Drivers however, CSP’s are normally implemented as standard user mode DLLs. Application code calls the Crypto API functions, which in turn call the CSP functions. The code used in XP_CRYPTOAPI to initialize a CSP is as follows:


Upon successful return of the ‘CryptAcquireContext’ function, we get a handle to the CSP in the hProv variable. We use the flag ‘CRYPT_VERIFYCONTEXT’ to specify that we do not need access to any public/private key pairs because we are only interested in hashing support. This helps speed up this call. We use the ‘CRYPT_SILENT’ to ensure that the CSP does not display any user interface. This is especially important in the context of an XP since it will be running as a service with no one available to respond to any UI, which might appear.

The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter  

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster

Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   



 Copyright © 1996 -2017 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks

Hit Counter