HMAC-SHA256在德尔福
问题描述:
我需要为Amazon Web服务API生成HMAC-SHA256签名。旧的DCPcrypt库具有sha256例程,但不进行HMAC签名。任何人都知道可以使用的免费散列图书馆?
I need to generate HMAC-SHA256 signatures for the Amazon web services API. The old DCPcrypt library has sha256 routines but does not do HMAC signing. Anyone know of a free hashing library I could use?
答
经过多一点搜索,我发现OpenStreamSec - 它看起来像几年前被遗弃,但仍在D2007中编译。
After a little more searching I found OpenStreamSec - which looks like it was abandoned a few years ago but still compiles in D2007.
http://sourceforge.net/projects/ openstrsecii /
为Amazon生成HMAC-256非常简单:
Generating a HMAC-256 for Amazon is really simple:
StrToMime64(HMACString(haSHA256, SecretKey, 32, DataToHash));