Hi all,
Pls see a Harbour library which implements SHA2 related
checksumming and SHA2 MAC creation, here:

http://www.syenar.hu/harbour/hbsha2.zip

Usage from .prg:
HB_SHA224( <cMessage> ) -> <cDigest>
HB_SHA256( <cMessage> ) -> <cDigest>
HB_SHA384( <cMessage> ) -> <cDigest>
HB_SHA512( <cMessage> ) -> <cDigest>

HB_SHA224_HMAC( <cMessage>, <cKey> ) -> <cMAC>
HB_SHA256_HMAC( <cMessage>, <cKey> ) -> <cMAC>
HB_SHA384_HMAC( <cMessage>, <cKey> ) -> <cMAC>
HB_SHA512_HMAC( <cMessage>, <cKey> ) -> <cMAC>

This is a thin wrapper around this code:
http://www.ouah.org/ogay/sha2/
http://www.ouah.org/ogay/hmac/

Above code has BSD license, the same as used in PCRE, so I assume
it's also safe to include it in Harbour.

You can unzip the attached code in the contrib dir, and build
it just like any other contribs.

If there are no objections and I've received feedback, I plan to
add these functions to the core.

Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to