pike.git / lib / modules / Crypto / substitution.pike

version» Context lines:

pike.git/lib/modules/Crypto/substitution.pike:2:   //! Implements a simple substitution crypto, ie. one of the first crypto   //! systems ever invented and thus one of the least secure ones available.      static mapping(string:string|array(string)) enc_key = ([]);   static mapping(string:string) dec_key = ([]);   static int(0..1) is_expandable;   static array(string) null_chars = ({});   static int null_fq;      static constant AZ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"/1; - static constant az = "abcdefghijklmnoprqstuvwxyz"/1; + static constant az = "abcdefghijklmnopqrstuvwxyz"/1;      static array(int) charify(array(string) x) {    return map(x, lambda(string y) { return y[0]; });   }      //! Sets the encryption and decryption key. The decryption key is   //! derived from the encryption @[key] by reversing the mapping. If   //! one index maps to an array of strings, one element from the array   //! will be chosen at random in such substitution.   //! @throws