Skip to content
Cinder block that has no dependancies for simple SHA1 hashing
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Cinder block, that has no dependancies, for simple SHA1 hashing.


  • add exception throwing on any errors (especially when trying to checksum non existing file)

Cinder comes with Boost which has boost::uuids::detail::sha1 in boost/uuid/sha1.hpp and of course it works, but we find this small helper class more attractive for quick checksumming files downloaded from interwebs.


fs::path pathToFile = getAssetPath("file.ext");

SHA1 mySha1;
string checkSum;
checkSum = mySha1.from_file( pathToFile.string() );
cinder::app::console() << "file checksum: " << checkSum << endl;


Found randomly in interwebs, located in pushover repo. All credit goes to as stated below.

SHA-1 in C++

100% Public Domain.

Original C Code
    -- Steve Reid <>
Small changes to fit into bglibs
    -- Bruce Guenter <>
Translation to simpler C++ Code
    -- Volker Grabsch <>
You can’t perform that action at this time.