Skip to content

Latest commit

 

History

History
27 lines (15 loc) · 1006 Bytes

File metadata and controls

27 lines (15 loc) · 1006 Bytes

SHA-512 Implementation

This repository contains code in C++ which performs SHA-512 on any file. This source code is written from scratch, based on the pseudocode presented at https://en.wikipedia.org/wiki/SHA-2. Please see https://github.com/wdjose/sha-512/blob/master/profile_result.txt for runtime comparison with Python's hashlib library and Ubuntu's sha512sum utility.

To compile:

make

Usage:

./profile_sha512.out <filename>

Example:

./profile_sha512.out ubuntu-18.04.3-desktop-amd64.iso

This repository also contains a bash script profiler comparing the C++ program performance with:

  • A python program utilizing the hashlib library
  • The sha512sum command built in Ubuntu

Usage:

bash profile_sha512.sh <filename1> <filename2> > profile_result.txt

Example:

bash profile_sha512.sh ubuntu-18.04.3-desktop-amd64.iso VirtualBox-6.1.4-136177-Win.exe > profile_result.txt