public function retrieve($a, $b)
 {
     $pos = strpos($this->plaintext_key, $b);
     $key = $this->getSubstitutionTableEntry($pos);
     $table = new SimpleCipher($this->plaintext_key, $key);
     return $table->decrypt($a);
 }
 /**
  * Reset the substitution table to original form
  *
  * @return $this
  */
 protected function _reset()
 {
     parent::_reset();
     $this->substitution_table->setSubstitutions(array(str_split(strrev($this->substitution_table->getPlaintextKey()))));
     return $this;
 }
示例#3
0
 /**
  * Reset the substitution table to its original form
  *
  * @return $this
  */
 protected function _reset()
 {
     parent::_reset();
     $this->substitution_table->setSubstitutions(array(str_split(Helper::rotate($this->substitution_table->getPlaintextKey(), $this->rotation_value - 1))));
     return $this;
 }