[osflash] Porting SHA-1 implementation from Java to AS3
Tiago Vale
tiago.vale at gmail.com
Wed Nov 23 10:27:57 EST 2005
Hi list,
Im porting a SHA-1 implementation from java to AS3 and theres a strange
behaviour that I cant deal with, I really dont know if this is a Java or a
Flash question, but here it goes.
JAVA
tracing "int " + blk + " + " + 0x5A827999 + " + " + ro + " + " + prev+ "
= " + data[z]
output int -67371266 + 1518500249 + 585074272 + 271733878 = -1987030163
FLEX
tracing "int " + blk + " + " + 0x5A827999 + " + " + ro + " + " + prev+ "
= " + data[z]
output int -67371266 + 1518500249 + 585074272 + 271733878 = 2307937133
I know some arithematics enough to know that a first glance Flex is dealing
right, but since this implementation works with Java I reall whant to know
whats wrongh here.
this is happening in the R0 function.
Thankz in advance
Heres the Java source
http://www.icksys.com/rqb/fdbc/SHA1.java
Heres the AS3 source
http://www.icksys.com/rqb/fdbc/SHA1.as
--
Cheers Tiago Janz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20051123/57bdf91d/attachment.htm
More information about the osflash
mailing list