Skip to content

A simple C++ based SHA256 hashing algorithm implementation

Notifications You must be signed in to change notification settings

KnightChaser/SHA256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

SHA256

Rougly Implemented. Need to be trimmed and cleaned. But anyway, it works!

Can I implement SHA 256 hashing algorithm in C++?

My professor used to tell me, if you learn, then you try to use that everywhere you wish or have to.



Very ez to use due to the encapsulation. (Refer to the following example usage)

int main() {

	SHA256 sha256;

	cout << sha256.getSHA256HexHash("hello world!", "text") << endl;	// 7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9
	cout << sha256.getSHA256HexHash("./KMSRoon.png", "binary") << endl;	// c01cd743c5749e0d98731923b8bc94dec5c29d2d297b3fce6d7602d1803cb7a7


}
7509e5bda0c762d2bac7f90d758b5b2263fa01ccbc542ab5e3df163be08e6ca9
c01cd743c5749e0d98731923b8bc94dec5c29d2d297b3fce6d7602d1803cb7a7

Supports both text(consisted of ASCII data) and binary(pictures, raw binary data, dll files, etc. You can run this implementation of SHA256 by putting their locations.) inputs. However, this code is not written for performancing to be adopted in the real applications. It's for learning or education.

About

A simple C++ based SHA256 hashing algorithm implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages