Important alert: (current site time 5/26/2015 1:02:40 AM EDT)

winzip icon

Hashing with CryptoAPI 10-May-2015

Submitted on: 5/12/2015 6:13:18 AM
By: Kenaso 
Level: Intermediate
User Rating: By 9 Users
Compatibility: VB 6.0
Views: 24678
author picture
(About the author)
     Example of using MS CryptoAPI hash algorithms (MD2, MD4, MD5, SHA1,SHA256, SHA384, SHA512) available with Windows. Very well documented. Works with Windows 8.1 === 10-May-2015 Updated support modules and documentation. Fixed bug in clsOperSystem.cls which did not allow the application to compile under XP.

winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net

Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Other 33 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

10/18/2010 9:11:27 AMThePiper

Hello Kenneth

Wow! Thanks for CryptoAPI SHA2! Didn't know that Sha2 is now contained in the MS CSP. The constant MS_ENH_RSA_AES_PROV_XP let me suspect that AES is also available in it.
You would be the right man to demonstrate a professional reference implementation in VB6! The Iast challenge... Yes, I know..., but please don't say no! ;-)
(If this comment was disrespectful, please report it.)

10/19/2010 8:55:59 AMKenaso

Working on it Alfred. MS does not make it easy. They tend to get off the path and lost in the woods. I am trying to find a user friendly way to utilize their encryption process. So far it is very frustrating.
(If this comment was disrespectful, please report it.)

10/21/2010 6:36:02 AMThePiper

Yes, Kenneth, the MS Crypto API is a hard way, but his core functions are of the best quality world wide, I think. A must for MS. So, please, fight it out. I will spend a lot of time to test the results ("field tests"). Until then - good luck! ;-)
(If this comment was disrespectful, please report it.)

6/3/2011 6:14:15 AMKenaso

MS does not support SHA-224, SHA-512/224, or SHA-512/256 at this time. The current code is pretty solid. If you find any problems, pleae notify me. Thank you.
(If this comment was disrespectful, please report it.)

4/1/2012 9:45:19 PMm poser

CryptoAPI has a skeleton key to assist NSA later, google it or ask Iranians :) Flawed just like any other tech from MS. Also your other wiping utiliy does not wipe anything. I recovered all files with recovery software.
(If this comment was disrespectful, please report it.)

4/2/2012 6:00:29 PMKenaso

m poser,
1. Skeleton key? Is this rumor control or some other conspiracy gossip? Is there some evidence of this key? Besides this is hashing not coding. Hashes are in conjunction with FIPS 180-02-, 180-3 and 180-4 NIST Publications.
2. As far as the wiping of files, please elaborate as to what you did to perform a wipe along with how it was recovered. You are the first to ever make such a claim and I am very interested your findings.
Write to me directly with screen shots and the steps you followed. Thank you.

(If this comment was disrespectful, please report it.)

8/11/2012 4:37:01 PMBonnie West

(If this comment was disrespectful, please report it.)

1/1/2014 3:25:53 PMolandi_mundi

This thorax is a child or a coward user ? I wonder that because he voted erroneously for many codes that were incredible ... like this one
(If this comment was disrespectful, please report it.)


Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.