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