Neither SHA1 or MD5 is crypting - both are hashes.
To obtain these hashes is simple. Say you have n bytes starting at ptr:
Cout() << SHA1String(ptr, n);
prints its has in hex form. SHA1StringS variant adds '-' into string.
If you are interested in hash bytes only, use SHA1 (and provide 20 bytes buffer to store the result).
If you want to process e.g. some very big file that you do not want to store into memory, use Sha1Stream - send all bytes to it, then retrieve result with one of