1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/node_modules/aes-decrypter
2022-03-17 11:43:59 -03:00
..
dist https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
scripts Git update 2022-03-17 11:43:59 -03:00
src Git update 2022-03-17 11:43:59 -03:00
test https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
CHANGELOG.md https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
CONTRIBUTING.md https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
index.html https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
LICENSE https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00
package.json Git update 2022-03-17 11:43:59 -03:00
README.md https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556 2022-03-14 14:28:38 -03:00

aes-decrypter

Build Status Greenkeeper badge Slack Status

NPM

Installation

npm install --save aes-decrypter

Also available to install globally:

npm install --global aes-decrypter

The npm installation is preferred, but Bower works, too.

bower install  --save aes-decrypter

Usage

To include decrypter on your website or npm application, use any of the following methods.

var Decrypter = require('aes-decrypter').Decrypter;
var fs = require('fs');
var keyContent = fs.readFileSync('something.key');
var encryptedBytes = fs.readFileSync('somithing.txt');

// keyContent is a string of the aes-keys content
var keyContent = fs.readFileSync(keyFile);

var view = new DataView(keyContent.buffer);
var key.bytes = new Uint32Array([
  view.getUint32(0),
  view.getUint32(4),
  view.getUint32(8),
  view.getUint32(12)
]);

key.iv = new Uint32Array([
  0, 0, 0, 0
]);

var d = new Decrypter(
  encryptedBytes,
  key.bytes,
  key.iv,
  function(err, decryptedBytes) {
    // err always null
});

License

Apache-2.0. Copyright (c) Brightcove, Inc.