I'm trying to md5 some file with as3corelib, but if I compare the as3 hash with a php one, I get different strings.
That's what I do:
_loader = new URLLoader();
_loader.load( new URLRequest( "image.jpg" ) );
_loader.addEventListener( Event.COMPLETE, completeHandler );
private function completeHandler( event:Event ):void {
var data:ByteArray = new ByteArray();
data.writeUTFBytes( _loader.data );
var hash:MD5Stream = new MD5Stream();
trace(hash.complete(data));
}
I've already googled for this issue, finding this post where a similar thing is discussed (making an hash of a string).
Any idea?