public static decryptResource ( resource $inputHandle, resource $outputHandle, Defuse\Crypto\Key $key ) | ||
$inputHandle | resource | |
$outputHandle | resource | |
$key | Defuse\Crypto\Key |
public static function decryptResource($inputHandle, $outputHandle, Key $key)
{
self::decryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword::createFromKey($key));
}
/** * Decrypts a stream. * * @param resource $resource The stream to decrypt. * * @return resource The decrypted stream. */ private function decryptStream($resource) { $out = fopen('php://memory', 'r+b'); File::decryptResource($resource, $out, $this->key()); rewind($out); return $out; }