Defuse\Crypto\Crypto::decryptWithPassword PHP 메소드

decryptWithPassword() 공개 정적인 메소드

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
리턴 string
    public static function decryptWithPassword($ciphertext, $password, $raw_binary = false)
    {
        return self::decryptInternal($ciphertext, KeyOrPassword::createFromPassword($password), $raw_binary);
    }

Usage Example

예제 #1
0
 /**
  * @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