Skip to content

hon4/libsha1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

154 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hon's libSHA1

An open source, indepedent and easy to use SHA1 for C/C++.

General Note

2025-11-21: The autoconf branch renamed to main and set as the default. The old main that contains the raw .h file renamed to old_raw.

Satus

v0.0.1 - First Tested Version

WARNING: This lib is currently BETA. Some functions may not work correctly and some function structures may change in future versions.

Requirements

  • STD: C89 or newer

Example Usage

At the beginning of the file:

#include <sha1.h>

Then:

unsigned char* text_str = "this text will be hashed";
unsigned char* sha1_hash = sha1(text_str, strlen(text_str));

For complete examples, see examples directory.

When compiling use -lsha1 to include the library. For example.c:

gcc example.c -o example -lsha1

Tests

You can compile example1.c and example2.c from the examples dir to test the lib. If output is A94A8FE5CCB19BA61C4C0873D391E987982FBBD3, it means that the lib is working correctly.

For test info see TESTS.md

About

Open Source & Indepedent C/C++ SHA1 Library

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages