An implementation of the hashing algorithm SHA-256 in C.
This code closely follows the pseudocode provided in the official documentation FIPS 180-4, Section 6.2.2, page 22.
Click here to view the demo video.
This video is also included in this repo under the name of demo-video.mp4
In your (Mac or Linux) Terminal or Windows Subsystem for Linux, run the following commands:
git clone https://github.com/kietatr/SHA256.git
cd SHA256
make
The make
command will:
- Compile the source code
- Then run the compiled executable file
main
for you
There isn't a standard C implementation for SHA-256, so we settled with an implementation from amosnier, which has been reviewed with the Stack Exchange CODE REVIEW.
To time the code of my implementation, run:
make time-my-implementation
To time the code of amosnier's implementation, run:
make time-other-implementation