RTI_CRYPTO (OpenInsight 64-bit)
At 15 DEC 2020 11:07:53AM Jason Leach wrote:
RTI_CRYPTO in OI 10.8.1 seems to return its values in uppercase vs OI 9.4.4 which returns its values in lowercase.
We have a small bit of code where this causes an issue.
For example, the code below will produce a very different hashedpw from 9 to 10 because of the salt being a different case
…
salt = RTI_Crypto( "HEX_MD5", "ABC" )
pw = "test"
hashedpw = RTI_Crypto("HEX_HMAC_MD5", salt,pw)
…
I know we can just lowercase the salt in the oi10 version but was just curious as to why there is a difference?
Jason
At 15 DEC 2020 11:30AM Carl Pates wrote:
Hi Jason,
The underlying code is completely different.
IIRC v9 uses a jScript function via the windows scripting control - and the code, by default, uses lower case (the actual jScript can be found in a insert called RTI_PAJ_MD5 - it has a variable that sets the case at the top)
v10 uses a native C++ library, but it's hex output is always uppercase. I'm afraid it's just one of those migration issues when you're having to share the hash string between the two versions.
Regards