winzip icon

SHA-2 256 [Update April 2020]

Submitted on: 4/2/2020 7:01:29 AM
By: Rde 
Level: Advanced
User Rating: By 1 Users
Compatibility: VB 5.0, VB 6.0
Views: 7935
author picture

SHA-2 256 [Update April 2020]

This class makes very fast open source code performing the most used SHA-2 hash function SHA-256 freely available to any OS on 32-bit x86.

This is a stand-alone 20kb class utilizing low-level machine code for accelerated speed. Highly optimized and very fast!

You are free to use any part or all of this code even for commercial purposes under the agreement that you receive absolutely no warranties expressed or implied.

Now includes option for Finalize to also return the message bit length. Latest 2020 update offers improved performance of the as$embler algorithm. Update April 2020 supersedes all prior versions.

100% compatible with the SHA-2 specification.
The official publication is available free of charge from:

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

Other 25 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 Advanced 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

12/2/2016 11:00:35 AMRde

Hi all
This algorithm has passed all tests including
input that is not a multiple of 8 bits
(this is apparently very rare)
Happy coding
(If this comment was disrespectful, please report it.)

12/2/2016 1:40:30 PMdave Carter

Awesome work Rohan, thanks for sharing :D
(If this comment was disrespectful, please report it.)

12/3/2016 7:17:43 AMRde

Hi Dave
Thanks mate, much appreciated
SHA-384 and 512 coming soon!
Happy coding :)
(If this comment was disrespectful, please report it.)

12/15/2016 2:17:49 AMJoshy Francis

Great work. waiting for SHA-512.
(If this comment was disrespectful, please report it.)

12/16/2016 12:06:25 PMRde

Hi Joshy
You can find the SHA-384 and 512 submission
at PSC txtCodeId=74822 named
Accelerated SHA-2
Happy coding :)
(If this comment was disrespectful, please report it.)

3/31/2020 3:50:20 AMRde

My comment above is incorrect now
That post with SHA-512 is now:
Secure Hash Algorithms 2
(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.