-
Notifications
You must be signed in to change notification settings - Fork 26
CRC32
Nick Ryzhy edited this page Apr 4, 2016
·
4 revisions
Generates a CRC-32 (Cyclic Redundancy Check) checksum.
Name | Value |
---|---|
Package | by.blooddy.crypto |
Name | final class CRC32 |
Inheritance |
CRC32 → Process → EventDispatcher → Object
|
import by.blooddy.crypto.CRC32;
var result:uint = CRC32.hash( 'text' );
import by.blooddy.crypto.CRC32;
import by.blooddy.crypto.events.ProcessEvent;
var crc32:CRC32 = new CRC32();
crc32.hash( 'text' );
crc32.addEventListener( ProcessEvent.COMPLETE, function(event:ProcessEvent):void {
var result:uint = event.data;
trace( result ); // async result
} );
crc32.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 |
---|---|
CRC32() |
Creates a CRC32 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. |