Horde_Crypt_Blowfish_Base::encrypt PHP Method

encrypt() abstract public method

Encrypts a string.
abstract public encrypt ( string $text ) : string
$text string The string to encrypt.
return string The ciphertext.
    public abstract function encrypt($text);

Usage Example

Esempio n. 1
0
 /**
  * Encrypts a string.
  *
  * @param string $text  The string to encrypt.
  *
  * @return string  The ciphertext.
  * @throws Horde_Crypt_Blowfish_Exception
  */
 public function encrypt($text)
 {
     if (!is_string($text)) {
         throw new Horde_Crypt_Blowfish_Exception('Data to encrypt must be a string.');
     }
     return $this->_crypt->encrypt($text);
 }