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?
- 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.
- SHA1 is a standard cryptography method
- Many APIs require a hashed string to verify the origin of POST or GET via header values
- 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?
Any ideas, please reply.
John M. Whitney