Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seeking FOSS SHA1

Tags:

sha1

delphi

I am looking for a FOSS SHA1 implementation for use with Delphi (7).

Preferably something small, maybe even standalone SHA1, rather than past of a humongous library. Ease of install and use are nice, but of course reliability is priority number 1.


Update:Thanks, Rob, that code works like a dream

like image 606
Mawg says reinstate Monica Avatar asked May 24 '11 12:05

Mawg says reinstate Monica


1 Answers

Use the Cryptography API built in to the OS. You can use the Hashes.pas unit by Domingo Seoane to use it in Delphi, or you can write your own routine using CryptAcquireContext, CryptCreateHash, repeated calls to CryptHashData, and finally CryptGetHashParam to get the result.

I realize it's neither free (as in speech) nor open source, but there are also no distribution requirements since it's included on all your customers' systems already.

like image 187
Rob Kennedy Avatar answered Sep 29 '22 23:09

Rob Kennedy