| Package | calista.hash |
| Class | public class Blowfish |
| Inheritance | Blowfish Object |
Example :
import calista.hash.Blowfish ;
var blowfish:Blowfish = new Blowfish("calista") ;
trace( blowfish.encrypt( "hello world" ) ) ; // "09B162A36AF69F66699E5BAE6CF11B3C"
trace( blowfish.decrypt( "09B162A36AF69F66699E5BAE6CF11B3C" ) ; // hello world
| Property | Defined By | ||
|---|---|---|---|
| key : String
The key of the blowfish algorithm. | Blowfish | ||
| p : Array | Blowfish | ||
| s0 : Array | Blowfish | ||
| s1 : Array | Blowfish | ||
| s2 : Array | Blowfish | ||
| s3 : Array | Blowfish | ||
| xl_par : Number | Blowfish | ||
| xr_par : Number | Blowfish | ||
| Method | Defined By | ||
|---|---|---|---|
Blowfish(key:String = null)
Creates a new Blowfish instance. | Blowfish | ||
decrypt(cipher:String):String
Use Blowfish algorithm to decrypt ciphertext using key. | Blowfish | ||
decrypt(cipher:String, key:String):String [static]
Use Blowfish algorithm to decrypt ciphertext using key. | Blowfish | ||
encrypt(source:String):String
Uses Blowfish algorithm to encrypt a string value using key. | Blowfish | ||
encrypt(source:String, key:String):String [static]
Uses Blowfish algorithm to encrypt a string value using key. | Blowfish | ||
| Constant | Defined By | ||
|---|---|---|---|
| singleton : Blowfish [static]
The blowfish singleton reference. | Blowfish | ||
| key | property |
key:StringThe key of the blowfish algorithm.
public function get key():String public function set key(value:String):void| p | property |
public var p:Array| s0 | property |
public var s0:Array| s1 | property |
public var s1:Array| s2 | property |
public var s2:Array| s3 | property |
public var s3:Array| xl_par | property |
public var xl_par:Number| xr_par | property |
public var xr_par:Number| Blowfish | () | Constructor |
public function Blowfish(key:String = null)Creates a new Blowfish instance.
Parameterskey:String (default = null) |
| decrypt | () | method |
public function decrypt(cipher:String):StringUse Blowfish algorithm to decrypt ciphertext using key.
Example :
import calista.hash.Blowfish ;
var blowfish:Blowfish = new Blowfish("calista") ;
trace( blowfish.decrypt( "09B162A36AF69F66699E5BAE6CF11B3C" ) ; // hello world
Parameters
cipher:String — String to be decrypted.
|
String — The decrypted text.
|
| decrypt | () | method |
public static function decrypt(cipher:String, key:String):StringUse Blowfish algorithm to decrypt ciphertext using key.
Example :
import calista.hash.Blowfish ;
trace( Blowfish.decrypt( "09B162A36AF69F66699E5BAE6CF11B3C" , "calista" ) ; // hello world
Parameters
cipher:String — String to be decrypted.
| |
key:String |
String — The decrypted text.
|
| encrypt | () | method |
public function encrypt(source:String):StringUses Blowfish algorithm to encrypt a string value using key.
Example :
import calista.hash.Blowfish ;
var blowfish:Blowfish = new Blowfish("calista") ;
trace( blowfish.encrypt( "hello world" ) ) ; // "09B162A36AF69F66699E5BAE6CF11B3C"
Parameters
source:String — The source to encrypt.
|
String — The encrypted cypher text as string.
|
| encrypt | () | method |
public static function encrypt(source:String, key:String):StringUses Blowfish algorithm to encrypt a string value using key.
Example :
import calista.hash.Blowfish ;
trace( Blowfish.encrypt( "hello world" , "calista" ) ) ; // "09B162A36AF69F66699E5BAE6CF11B3C"
Parameters
source:String — The source to encrypt.
| |
key:String — The key used to encrypt.
|
String — The encrypted cypher text as string.
|
| singleton | Constant |
public static const singleton:BlowfishThe blowfish singleton reference.