-
Notifications
You must be signed in to change notification settings - Fork 24
MD5
Nick Ryzhy edited this page Apr 4, 2016
·
7 revisions
Encodes and decodes binary data using MD5 (Message Digest) algorithm.
| Name | Value |
|---|---|
| Package | by.blooddy.crypto |
| Name | final class MD5 |
| Inheritance |
MD5 → Process → EventDispatcher → Object
|
import by.blooddy.crypto.MD5;
var result:String = MD5.hash( 'text' );import by.blooddy.crypto.MD5;
import by.blooddy.crypto.events.ProcessEvent;
var md5:MD5 = new MD5();
md5.hash( 'text' );
md5.addEventListener( ProcessEvent.COMPLETE, function(event:ProcessEvent):void {
var result:String = event.data;
trace( result ); // async result
} );
md5.addEventListener( ProcessEvent.ERROR, function(event:ProcessEvent):void {
var error:Error = event.data;
trace( error ); // async error
} );| Name | Description |
|---|---|
hash(str:String):String |
Performs hash algorithm on a String. Return a String containing the hash value of str. |
hashBytes(bytes:ByteArray):String |
Performs hash algorithm on a ByteArray. Return a String containing the hash value of bytes. |
digest(bytes:ByteArray):ByteArray |
Performs hash algorithm on a ByteArray. Return a ByteArray containing the hash value of bytes. |
| Name | Description |
|---|---|
MD5() |
Creates a MD5 object. |
| Name | Description |
|---|---|
hash(str:String):void |
Asynchronously performs hash algorithm on a String. Dispatched String result in ProcessEvent. |
hashBytes(bytes:ByteArray):void |
Asynchronously performs hash algorithm on a ByteArray. Dispatched String result in ProcessEvent. |
digest(bytes:ByteArray):void |
Asynchronously performs hash algorithm on a ByteArray. Dispatched ByteArray result in ProcessEvent. |
| Name | Type | Description |
|---|---|---|
complete |
ProcessEvent | Dispatched when success. |
error |
ProcessEvent | Dispatched when fault. |