Coldfusion Hash SHA-1 Doesnt look the same as the sample -
im working on script hash "fingerprint" communicating secure pay direct post api.
the issue have im trying create sha-1 string matches sample code provided can ensure things posted accurately.
the example sha-1 string appears encoded like
01a1edbb159aa01b99740508d79620251c2f871d
however string when converted appears
7871d5c9a366339da848fc64cb32f6a9ad8fcadd
completely different...
my code follows..
<cfset variables.finger_print = "abc0010|txnpassword|0|test reference|1.00|20110616221931"> <cfset variables.finger_print = hash(variables.finger_print,'sha-1')> <cfoutput> #variables.finger_print# </cfoutput>
im using coldfusion 8 this
it generates 40 character hash, can see generating different strings.
hopefully out there has done before , can point me in right direction...
thanks in advance
** edit
the article creating hash contains following information.
example: setting fingerprint fields joined | separator:
abc0010|txnpassword|0|test reference|1.00|20110616221931
sha1 above string: 01a1edbb159aa01b99740508d79620251c2f871d
when generating above example string using coldfusion hash turns this
7871d5c9a366339da848fc64cb32f6a9ad8fcadd
01a1edbb159aa01b99740508d79620251c2f871d
sorry, not see how sample string possibly produce result given php, cf , java otherwise. suspect error in documentation. 1 thing stands out use of "txnpassword" instead of sample value, other fields. perhaps used different value produce string , forgot plug actual example?
update:
example 5.2.1.12, on page 27, makes more sense. ignoring case, results coldfusion match exactly. noticed description mentions summarycode
value, absent example in section 3.3.6. tends support theory of documentation error earlier example.
code:
<cfset input = "abc0010|mytxnpasswd|myreference|1000|201105231545|1"> <cfoutput>#hash(input, "sha-1")#</cfoutput>
result:
3f97240c9607e86f87c405af340608828d331e10
Tips for Making Habanero Spicy Chiles with - TITNIA
ReplyDeleteTitanium titanium price per pound has the potential 하랑 도메인 to produce titanium nipple bars a delicious burnt titanium habanero pepper titanium hoop earrings sauce that has a fruity flavor with plenty of heat and flavor.