Kbase P118504: SHA1-DIGEST function returns a different result to other tools when using HASH-KEY parameter
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/11/2008 |
|
Status: Unverified
SYMPTOM(s):
Using SHA1-DIGEST function to hash data
Result returned by Progress differs from the result generated in other tools
HEX-ENCODE(SHA1-DIGEST("The quick brown fox jumps over the lazy dog")) returns:
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
With the same input, 3rd party tool returns the same output when it is not using a HMAC value.
3rd party tool is using an optional HMAC (keyed-hash message authentication code) value.
When using the optional "HASH-KEY" parameter with the Progress SHA1-DIGEST function the results differ from the results when a 3rd party utility is used.
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
The Progress SHA1-DIGEST function appends the HASH-KEY value to the "DATA-TO-HASH" component of the function before the hash operation begins. The Progress SHA1-DIGEST function doesn't use a HMAC component in its calculation.
FIX:
Do not use the HMAC option when using the 3rd party utility and add the value for the HMAC to the data section of the utility. This should result in the same output as the Progress SHA1-DIGEST function.