diff options
author | Tomer <11458759+tomer8007@users.noreply.github.com> | 2020-10-28 18:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 18:17:00 +0100 |
commit | bf2f2685e0a957f4011ee64d0c720a3869580349 (patch) | |
tree | 11a278d9c8f4a7b75ac1a0f1de328b718d9a79ad /content_key_decryption.js | |
parent | Merge pull request #13 from erjanmx/fix-readme-typo (diff) | |
parent | Fix for pages that use iframes (diff) | |
download | widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar.gz widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar.bz2 widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar.lz widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar.xz widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.tar.zst widevine-l3-decryptor-bf2f2685e0a957f4011ee64d0c720a3869580349.zip |
Diffstat (limited to 'content_key_decryption.js')
-rw-r--r-- | content_key_decryption.js | 32 |
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 +}());
|