[fpc-pascal] HMAC_SHA1 and FPC

Tomas Hajny XHajT03 at hajny.biz
Sat Mar 23 22:11:44 CET 2013


On Sat, March 23, 2013 16:21, silvioprog wrote:
> 2013/3/23 Tomas Hajny <XHajT03 at hajny.biz>
>> On Sat, March 23, 2013 06:28, silvioprog wrote:
>>
>> Hi,
>>
>> > How to get HMAC_SHA1 using native functions of FPC?
>> >
>> > HMAC_SHA1:
>> >
>> http://en.wikipedia.org/wiki/Hash-based_message_authentication_code#Examples_of_HMAC_.28MD5.2C_SHA1.2C_SHA256.29
>>
>> Doesn't package hash (included with FPC by default for all targets)
>> cover
>> your needs?
>
> Yes, the "sha1" unit, but how to do it? I was seeing a function in PHP,
> but
> I couldn't port it to the Free Pascal.

Have you also checked the included examples (in particular sha1test.pp)? I
haven't used it myself (I had no such need), but it looks quite
straightforward to me.

Tomas





More information about the fpc-pascal mailing list