public static function encryptResource($inputHandle, $outputHandle, Key $key) { self::encryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword::createFromKey($key)); }
/** * Encrypts a stream. * * @param resource $resource The stream to encrypt. * * @return resource The encrypted stream. */ private function encryptStream($resource) { $out = fopen('php://temp', 'r+b'); File::encryptResource($resource, $out, $this->key()); rewind($out); return $out; }