Packagecalista.hash
Classpublic class SHA256
InheritanceSHA256 Inheritance Object

A cryptographic hash (sometimes called ‘digest’) is a kind of ‘signature’ for a text or a data file. SHA-256 generates an almost-unique 256-bit (32-byte) signature for a text.

Original Javascript implementation :

Chris Veness, Movable Type Ltd: www.movable-type.co.uk

See http://www.movable-type.co.uk/scripts/sha256.html

Example :

     import calista.hash.SHA256 ;
     
     var hash:String = SHA256.encrypt("calista") ;
     var equal:Boolean = hash == 'c37a4150a942afb4b36dd5c85ac744a16de0891c99d418ae7b5ef528dfcf2e9d' ;
     
     trace("'hello world' SHA1 result : " + hash + " : " + equal ) ;
     



Public Methods
 MethodDefined By
  
encrypt(source:String):String
[static] Encrypt the specified text with the SHA-256 algorithm.
SHA256
Method Detail
encrypt()method
public static function encrypt(source:String):String

Encrypt the specified text with the SHA-256 algorithm.

Parameters

source:String

Returns
String