/** * Encrypts a message. * * @see Crypt_Base::decrypt() * @see Crypt_RC4::_crypt() * @access public * * @param String $plaintext * * @return String $ciphertext */ function encrypt($plaintext) { if ($this->engine == CRYPT_MODE_MCRYPT) { return parent::encrypt($plaintext); } return $this->_crypt($plaintext, CRYPT_RC4_ENCRYPT); }
/** * Encrypts a message. * * Mostly a wrapper for Crypt_Base::encrypt, with some additional OpenSSL handling code * * @see self::decrypt() * @access public * @param string $plaintext * @return string $ciphertext */ function encrypt($plaintext) { if ($this->engine == CRYPT_ENGINE_OPENSSL) { $temp = $this->key; $this->key = $this->orig_key; $result = parent::encrypt($plaintext); $this->key = $temp; return $result; } return parent::encrypt($plaintext); }
/** * Encrypts a message. * * @see Crypt_Base::decrypt() * @see self::_crypt() * @access public * @param string $plaintext * @return string $ciphertext */ function encrypt($plaintext) { if ($this->engine != CRYPT_ENGINE_INTERNAL) { return parent::encrypt($plaintext); } return $this->_crypt($plaintext, CRYPT_RC4_ENCRYPT); }
/** * {@inheritDoc} */ public function transform(AttributeEvent $event) { $value = $event->getValue(); $event->setValue($this->cipher->encrypt($value)); }