2 Replies Latest reply on Dec 17, 2009 6:48 AM by iamfuric

    SHA256.computeDigest, bug ?

    iamfuric Level 2

      The code below produces the same digests :

       var digest1:String =getDigest('1111')
       var digest2:String =getDigest('2222')
       private function getDigest(v:String):String{
        var ba:ByteArray =new ByteArray()
        return SHA256.computeDigest(ba);

      Only of string's lengthes are different, the digests aren't equal.
      Is it a bug ? Are there another methods to compute reliable hash ?