ProtocolAsarJob

Read asar archives to serve custom protocol requests.

Header#include "nativeui/protocol_file_job.h"
Namespacenamespace nu
Typeclass (RefCounted)
InheritsProtocolJob

The asar format is a simple extensive archive format, information of it can be found at https://github.com/electron/asar.

As an experimental feature, Yue supports reading from encrypted asar archives, which has not been a standard feature of asar yet but will probably be in future. More about this can be found at https://github.com/yue/muban.

Constructors

ProtocolAsarJob(const base::FilePath& asar, const std::string& path)

Create a ProtocolAsarJob with path to a file inside an asar archive.

Parameters

Methods

bool SetDecipher(const std::string& key, const std::string& iv)

Set the key and iv used to read from an encrypted asar archive, return false when the key and iv are not 16 bytes length.

The encrypted asar archives use AES128 ECB algorithm for encryption, with PKCS#7 padding.

Parameters

Return

bool