/** * Debugging the substitution table * * @return string */ public function substitutionTableToString() { $ciphers = $this->substitution_table->getSubstitutions(); return Helper::tableToString($ciphers, array(), array(), __CLASS__ . ' Encryption Table'); }
/** * Debugging the substitutions table * * @return string */ public function substitutionTableToString() { return Helper::tableToString($this->substitutions, str_split($this->plaintext_key), array(), get_class($this) . ' :: Substitution Table'); }
/** * Debugging * * @return string */ public function substitutionTableToString() { return Helper::tableToString($this->getSubstitutionTable(), array(), array(), '"Tabula Recta" Table'); }
/** * Debugging the substitution table * * @return string */ public function substitutionTableToString() { $ciphers = $this->substitution_table->getSubstitutions(); $ciphers = $ciphers[0]; foreach ($ciphers as $i => $list) { $ciphers[$i] = implode('-', $list); } return Helper::tableToString($ciphers, $this->substitution_table->getPlaintextKey(), array(), __CLASS__ . ' Encryption Table'); }
/** * Debugging the substitution table * * @return string */ public function substitutionTableToString() { $this->_reset(); $ptk = $this->substitution_table->getPlaintextKey(); $r = array(); for ($i = 0; $i < floor(strlen($ptk) / $this->frequency); $i++) { if ($i > 0) { $this->substitution_table->rotate(); } $ciphers = $this->substitution_table->getSubstitutions(); $r[] = str_split($ciphers[0]); } return Helper::tableToString($r, str_split($ptk), array(), __CLASS__ . ' Encryption Table'); }