Expand my Community achievements bar.

sha1hash algorithm is generating different output for different server environment

Avatar

Former Community Member

Hi All,

Why sha1hash algorithm is generating different hash output for different application server environment?

input string - ZAO CITIBANK

1) IBM websphere - Unix OS

output hash - 4197df7bab320dd30edaa237d6629ab51eec520a

2) JBOSS - Windows 2003 server

output hash - 4499dd77aa3300dd00ddaa33dd6699bb11ee5500


Please find below script and procedure to run the hashing algorithm in Adobe workbench


1)Create the activity of execute script containing following script in image

2)create 2 variables inputstring as input & outputhash as output of string type

sha1hash.JPG

2 Replies

Avatar

Former Community Member

I may be misinterpreting the documentation but your results appear to be predictable.

http://www.evolt.org/node/60122

'..."one-way hash encryption" also known as a message digest, digital signature, one-way encryption, digital fingerprint, or cryptographic hash. It is referred to as "one-way" because although you can calculate a message digest, given some data, you can't figure out what data produced a given message digest. This is also a collision-free mechanism that guarantees that no two different values will produce the same digest.'

Steve

Avatar

Former Community Member

Hi Steve,

Thanks for your link it will help.

But i dont understand i have two different application environment along with me and i am using execute script to get hash of the input string still both the environment is providing the different hash for same input string.

Is it something with the settings of charset encoding in the environment?

someone please point to the root cause of this issue or may provide any suggestion to resolve this

Regards

Abhishek