Make SHA1 hash from string '12345' with as3crypto in as3 the same way how it is done in there example:
var sha1:SHA1 = new SHA1;
var src:ByteArray = Hex.toArray("12345");
var digest:ByteArray = sha1.hash(src);
trace('SHA:' + Hex.fromArray(digest));
result : ec60c0fd70d82a7785f6c9a02dbe16f2e40b1344
Make SHA1 from the same string in PHP:
print "SHA:".sha1("12345");
result : 8cb2237d0679ca88db6464eac60da96345513964
If I try other tools to obtain hash I get the second result, so it looks like the result from PHP is correct.
Question: How can I get the same hash with as3crypto?
BTW: when testing I found that another way with as3crypto gives me another (wrong?) result:
var src:ByteArray = new ByteArray();
src.writeUTF("12345");
var digest:ByteArray = sha1.hash(src);
trace('SHA:' + Hex.fromArray(digest));
result : b98cfbc53daec4029895585ab198f7403d0d0506