pssh-tools
Advanced tools
Comparing version 1.0.9 to 1.0.10-alpha1
@@ -49,8 +49,9 @@ "use strict"; | ||
} | ||
const contentKey = keyBuffer.toString('hex'); | ||
// Calculate checksum | ||
const cipher = crypto.createCipheriv('aes-128-ecb', keyBuffer, '').setAutoPadding(false); | ||
const cipher = crypto.createCipheriv('aes-128-ecb', swapEndian(contentKey), '').setAutoPadding(false); | ||
const checksum = cipher.update(kidBuffer).slice(0, 8).toString('base64'); | ||
return { | ||
kid: kidBuffer.toString('base64'), | ||
key: keyBuffer.toString('base64'), | ||
key: swapEndian(contentKey).toString('base64'), | ||
checksum | ||
@@ -165,3 +166,3 @@ }; | ||
const key = keySeed && keySeed.length ? Buffer.from(generateContentKey(keyPair.kid, keySeed).key, 'base64').toString('hex') : keyPair.key; | ||
const keyBuffer = Buffer.from(key, 'hex'); | ||
const keyBuffer = swapEndian(key); | ||
const cipher = crypto.createCipheriv('aes-128-ecb', keyBuffer, '').setAutoPadding(false); | ||
@@ -168,0 +169,0 @@ const checksum = cipher.update(kidBuffer).slice(0, 8).toString('base64'); |
{ | ||
"name": "pssh-tools", | ||
"version": "1.0.9", | ||
"version": "1.0.10-alpha1", | ||
"description": "Tools to generate PSSH Data and PSSH Box", | ||
@@ -46,4 +46,4 @@ "main": "dist/src/index.js", | ||
"files": [ | ||
"test/**/*" | ||
], | ||
"test/**/*" | ||
], | ||
"require": [ | ||
@@ -54,3 +54,6 @@ "ts-node/register" | ||
"nyc": { | ||
"reporter": [ "lcov", "text" ], | ||
"reporter": [ | ||
"lcov", | ||
"text" | ||
], | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
@@ -57,0 +60,0 @@ "all": true, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48645
595
2