Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@subreader/netflix-msl

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@subreader/netflix-msl - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

lib/MSLClientFilesystemStore.d.ts

@@ -6,2 +6,3 @@ /// <reference types="node" />

export declare class MSLClientFilesystemStore implements IMSLClientStore {
path: string;
masterToken: MasterToken;

@@ -11,3 +12,4 @@ userIDToken: UserIDToken;

hmacKey: Buffer;
constructor({ masterToken, userIDToken, hmacKey, encryptionKey, }?: {
constructor({ path, masterToken, userIDToken, hmacKey, encryptionKey, }?: {
path?: string;
masterToken?: MasterToken;

@@ -14,0 +16,0 @@ userIDToken?: UserIDToken;

@@ -7,6 +7,8 @@ "use strict";

const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const MasterToken_1 = require("./MasterToken");
const UserIDToken_1 = require("./UserIDToken");
class MSLClientFilesystemStore {
constructor({ masterToken, userIDToken, hmacKey, encryptionKey, } = {}) {
constructor({ path = ".", masterToken, userIDToken, hmacKey, encryptionKey, } = {}) {
this.path = path;
if (masterToken) {

@@ -30,3 +32,3 @@ this.setMasterToken(masterToken);

return fs_1.default.promises
.readFile("MasterToken")
.readFile(path_1.default.join(this.path, "MasterToken"))
.then(data => {

@@ -43,3 +45,3 @@ const masterToken = MasterToken_1.MasterToken.decode(data.toString());

this.masterToken = masterToken;
await fs_1.default.promises.writeFile("MasterToken", masterToken.encode());
await fs_1.default.promises.writeFile(path_1.default.join(this.path, "MasterToken"), masterToken.encode());
}

@@ -51,3 +53,3 @@ async getHMACKey() {

return fs_1.default.promises
.readFile("HMACKey")
.readFile(path_1.default.join(this.path, "HMACKey"))
.then(hmacKey => {

@@ -63,3 +65,3 @@ this.hmacKey = hmacKey;

this.hmacKey = hmacKey;
await fs_1.default.promises.writeFile("HMACKey", hmacKey);
await fs_1.default.promises.writeFile(path_1.default.join(this.path, "HMACKey"), hmacKey);
}

@@ -71,3 +73,3 @@ async getEncryptionKey() {

return fs_1.default.promises
.readFile("EncryptionKey")
.readFile(path_1.default.join(this.path, "EncryptionKey"))
.then(encryptionKey => {

@@ -83,3 +85,3 @@ this.encryptionKey = encryptionKey;

this.encryptionKey = encryptionKey;
await fs_1.default.promises.writeFile("EncryptionKey", encryptionKey);
await fs_1.default.promises.writeFile(path_1.default.join(this.path, "EncryptionKey"), encryptionKey);
}

@@ -91,3 +93,3 @@ async getUserIDToken() {

return fs_1.default.promises
.readFile("UserIDToken")
.readFile(path_1.default.join(this.path, "UserIDToken"))
.then(data => {

@@ -104,3 +106,3 @@ const userIDToken = UserIDToken_1.UserIDToken.decode(data.toString());

this.userIDToken = userIDToken;
await fs_1.default.promises.writeFile("UserIDToken", userIDToken.encode());
await fs_1.default.promises.writeFile(path_1.default.join(this.path, "UserIDToken"), userIDToken.encode());
}

@@ -107,0 +109,0 @@ }

@@ -5,3 +5,3 @@ {

"description": "Netflix MSL Client",
"version": "1.0.3",
"version": "1.0.4",
"license": "ISC",

@@ -8,0 +8,0 @@ "main": "lib/MSLClient.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc