Packagecalista.hash
Classpublic class Vigenere
InheritanceVigenere Inheritance Object

The Vigenère cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution.

See the wikipedia article about it : Vigenère cipher

     import calista.hash.Vigenere ;
     trace( Vigenere.encrypt( "hello world" , calista" ) ; // jewtg potlo
     trace( Vigenere.decrypt( "jewtg potlo" , calista" ) ; // hello world
     



Public Methods
 MethodDefined By
  
Creates a new Vigenere instance.
Vigenere
  
decrypt(cipher:String, key:String):String
Use Vigenère algorithm to decrypt the specified cipher text.
Vigenere
  
decrypt(cipher:String, key:String):String
[static] Use Vigenère algorithm to decrypt the specified cipher text.
Vigenere
  
encrypt(source:String, key:String):String
Use Vigenère algorithm to encrypt the specified source text.
Vigenere
  
encrypt(source:String, key:String):String
[static] Use Vigenère algorithm to encrypt the specified source text.
Vigenere
Public Constants
 ConstantDefined By
  singleton : Vigenere
[static] The Vigenere singleton reference.
Vigenere
Constructor Detail
Vigenere()Constructor
public function Vigenere()

Creates a new Vigenere instance.

Method Detail
decrypt()method
public function decrypt(cipher:String, key:String):String

Use Vigenère algorithm to decrypt the specified cipher text.

Example :

         import calista.hash.Vigenere ;
         var vigenere:Vigenere = new Vigenere() ;
         trace( vigenere.decrypt( "jewtg potlo" , calista" ) ; // hello world
         

Parameters

cipher:String — String to be decrypted.
 
key:String — The key used to decrypt.

Returns
String — The decrypted text.
decrypt()method 
public static function decrypt(cipher:String, key:String):String

Use Vigenère algorithm to decrypt the specified cipher text.

Example :

         import calista.hash.Vigenere ;
         trace( Vigenere.decrypt( "jewtg potlo" , calista" ) ; // hello world
         

Parameters

cipher:String — String to be decrypted.
 
key:String — The key used to decrypt.

Returns
String — The decrypted text.
encrypt()method 
public function encrypt(source:String, key:String):String

Use Vigenère algorithm to encrypt the specified source text.

Example :

         import calista.hash.Vigenere ;
         var vigenere:Vigenere = new Vigenere() ;
         trace( vigenere.encrypt( "hello world" , calista" ) ; // jewtg potlo
         

Parameters

source:String — String to be encrypted.
 
key:String — The key used to encrypt.

Returns
String — The encrypted text.
encrypt()method 
public static function encrypt(source:String, key:String):String

Use Vigenère algorithm to encrypt the specified source text.

Example :

         import calista.hash.Vigenere ;
         trace( Vigenere.encrypt( "hello world" , calista" ) ; // jewtg potlo
         

Parameters

source:String — String to be encrypted.
 
key:String — The key used to encrypt.

Returns
String — The encrypted text.
Constant Detail
singletonConstant
public static const singleton:Vigenere

The Vigenere singleton reference.