Skip to content

A size tunable C language implementation of SHA-256

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

gdavidbutler/sha256

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHA256

A size tunable C language implementation of SHA-256.

SHA-256 is a member of the Secure Hash Algorithm 2 generating a 256 bit digest.

This implementation was created to provide size tunable code to fit in a memory constrained 32 bit microcontroller. If your compiler does not implement "unsigned int" as 32 bits, change "unsigned int" in sha256.c @ typedef unsigned int sha256_bt; to, perhaps, "unsigned long".

Included is an example driver program, main.c, that reads standard input till end-of-file and writes on standard output a hex representation of the hash.

Also included is a driver program, shaby.c, to use NIST test vectors to validate the implementation. Download the ZIP file and expand it in the test directory. Then type "make check" to validate the SHA256 vectors.

About

A size tunable C language implementation of SHA-256

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published