Cryptography Function (SHA-1)

Cryptography Function (SHA-1)

I need a function that calculates an HMAC hash from a Date String as the value, a shared Secret Access Key (both the sender and receiver have this key), and SHA1 as the hash algorithm.

Why?
  1. This is a simple way to verify the authenticity of information. For example, if you send an email to a client and included the hash as a "signature", the data can be validated by the client. There are many instances where this would find value.
  2. SHA1 is a standard cryptography method
  3. Many APIs require a hashed string to verify the origin of POST or GET via header values
  4. It looks like an interesting problem for Creator. Most programming languages already have functions that do this. Alas, Deluge does not.
Examples?

The function should do the same as this  http://hash.online-convert.com/sha1-generator where "Text you want to convert to a SHA-1 hash" is a Creator date string and "Shared secret key used for the HMAC variant (optional)" is not optional and is some alphanumeric string.

Resources?

There are PHP and C examples all over the net. I'm used to visual basic for Excel, and have been looking at this page for clues  http://stackoverflow.com/questions/125785/password-hash-function-for-excel-vba.

Any ideas, please reply.

John M. Whitney