Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
059d3d0d
authored
2016-02-05 14:37:01 -0500
by
brandonocasey
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added file-level comments to files
1 parent
63c80f63
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
src/decrypter/decrypter.js
src/decrypter/index.js
src/decrypter/decrypter.js
View file @
059d3d0
/**
* This file contains the `Decrypter` class which manages
* AES decryption through the `decrypt` function (which uses
* the `AES` class for lower level decrypting) and Asynchronous
* Streams from the `AsyncStream` class
*/
import
AES
from
'./aes'
;
import
AsyncStream
from
'./async-stream'
;
import
{
unpad
}
from
'pkcs7'
;
...
...
@@ -95,6 +102,11 @@ export const decrypt = function(encrypted, key, initVector) {
return
decrypted
;
};
/**
* The `Decrypter` class that manages decryption of AES
* data through `AsyncStream` objects and the `decrypt`
* function
*/
export
class
Decrypter
{
constructor
(
encrypted
,
key
,
initVector
,
done
)
{
let
step
=
Decrypter
.
STEP
;
...
...
src/decrypter/index.js
View file @
059d3d0
/**
* Main file for Decrypter so that we can neatly export
* all of our functionality as one object in one file
* and we will only have to require the top level directory
* in this case that would look like:
* ``` JavaScript
* import {Decrypter, decrypt, AsyncStream} from './src/decrypter';
* ```
*/
import
{
decrypt
,
Decrypter
}
from
'./decrypter'
;
import
AsyncStream
from
'./async-stream'
;
...
...
Please
register
or
sign in
to post a comment