Defuse\Crypto\Crypto::decryptWithPassword PHP Method

decryptWithPassword() public static method

Decrypts a ciphertext to a string with a password, using a slow key derivation function to make password cracking more expensive.
public static decryptWithPassword ( string $ciphertext, string $password, boolean $raw_binary = false ) : string
$ciphertext string
$password string
$raw_binary boolean
return string
    public static function decryptWithPassword($ciphertext, $password, $raw_binary = false)
    {
        return self::decryptInternal($ciphertext, KeyOrPassword::createFromPassword($password), $raw_binary);
    }

Usage Example

コード例 #1
0
ファイル: Authentication.php プロジェクト: solverat/pimcore
 /**
  * @param $passwordHash
  * @param $token
  * @return array
  */
 public static function tokenDecrypt($passwordHash, $token)
 {
     $decrypted = Crypto::decryptWithPassword($token, $passwordHash);
     return explode("|", $decrypted);
 }
All Usage Examples Of Defuse\Crypto\Crypto::decryptWithPassword