summaryrefslogtreecommitdiffstats
path: root/content_key_decryption.js
diff options
context:
space:
mode:
authornyuszika7h <nyuszika7h@gmail.com>2020-10-27 23:08:26 +0100
committernyuszika7h <nyuszika7h@gmail.com>2020-10-27 23:08:26 +0100
commit481551e5fba68c6ae2641b86703353180fa86761 (patch)
treee970486fcc9392c00e7407eb8a7421c7d130e8aa /content_key_decryption.js
parentMerge pull request #13 from erjanmx/fix-readme-typo (diff)
downloadwidevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar.gz
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar.bz2
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar.lz
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar.xz
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.tar.zst
widevine-l3-decryptor-481551e5fba68c6ae2641b86703353180fa86761.zip
Diffstat (limited to 'content_key_decryption.js')
-rw-r--r--content_key_decryption.js32
1 files changed, 16 insertions, 16 deletions
diff --git a/content_key_decryption.js b/content_key_decryption.js
index d5c7542..9412cfb 100644
--- a/content_key_decryption.js
+++ b/content_key_decryption.js
@@ -166,21 +166,21 @@ function wordToByteArray(wordArray)
// byte array to CryptoJS format
function arrayToWordArray(u8Array)
{
- var words = [], i = 0, len = u8Array.length;
-
- while (i < len) {
- words.push(
- (u8Array[i++] << 24) |
- (u8Array[i++] << 16) |
- (u8Array[i++] << 8) |
- (u8Array[i++])
- );
- }
-
- return {
- sigBytes: len,
- words: words
- };
+ var words = [], i = 0, len = u8Array.length;
+
+ while (i < len) {
+ words.push(
+ (u8Array[i++] << 24) |
+ (u8Array[i++] << 16) |
+ (u8Array[i++] << 8) |
+ (u8Array[i++])
+ );
+ }
+
+ return {
+ sigBytes: len,
+ words: words
+ };
}
const toHexString = bytes => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
@@ -209,4 +209,4 @@ function PEM2Binary(pem)
return bytes.buffer;
}
-}()); \ No newline at end of file
+}());