diff options
Diffstat (limited to '')
-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 +}());
|