I'm debugging my custom implementation of OAuth (shindig and spring-security-oauth libraries).
Regardless of shindig and spring-security details, I create a hash using sha() and then pass it to spring-security-oauth. I expect the hashes to be equal, but they're not.
shindig
bytes[] shindigHash = sha(someBytes); // docs for sha()
spring-security-oauth
bytes[] b = str.getBytes("UTF-8");` // String str passed in from
I also tried bytes[] b = str.getBytes(); for the default encoding, but it didn't equal shindigHash when I compared each of b's and shindigHash's elements.
EDIT
for j = 0 .. b.length // same as shindigHash length
print shindigHash[j] ... b[j]
end
visually compare results
comparisonquestion. I'd prefer to keep the same library, i.e. not update deprecated sha(), as multiple projects use it.