| Package | calista.hash |
| Class | public class TEA |
| Inheritance | TEA Object |
| Since : | FlashPlayer 10 |
Example :
import calista.hash.TEA ;
var source:String = "hello world is secret" ;
var password:String = "calista" ;
var encrypt:String = TEA.encrypt( source , password ) ;
trace("encrypt : " + encrypt) ;
var decrypt:String = TEA.decrypt(encrypt , password) ;
trace("decrypt : " + decrypt) ;
Original implementation :
Chris Veness, Movable Type Ltd: www.movable-type.co.uk
Algorithm: David Wheeler and Roger Needham, Cambridge University Computer Lab
See also
| Method | Defined By | ||
|---|---|---|---|
decrypt(cipher:String, key:String):String [static]
Use Corrected Block TEA to decrypt ciphertext using key. | TEA | ||
encrypt(source:String, key:String):String [static]
Uses corrected Block TEA to encrypt a string value using key. | TEA | ||
| decrypt | () | method |
public static function decrypt(cipher:String, key:String):StringUse Corrected Block TEA to decrypt ciphertext using key.
Parameters
cipher:String — String to be decrypted.
| |
key:String — The password to be used for decryption (1st 16 chars).
|
String — The decrypted text
|
| encrypt | () | method |
public static function encrypt(source:String, key:String):StringUses corrected Block TEA to encrypt a string value using key.
Parameters
source:String — The source to encrypt.
| |
key:String — The password key to encrypt the source (1st 16 chars).
|
String — The encrypted text as string.
|