aes-decrypter
decrypt aes-128 content using a key
Last updated 3 months ago by misterben .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install aes-decrypter 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.0-0                                ...           beta (8 years ago)
  • 3.0.1                                ...           experimental (5 years ago)
  • 4.0.2                                ...           latest (3 months ago)
  • 3.0.1-0                                ...           next (5 years ago)

20 Versions

  • 4.0.2                                ...           3 months ago
  • 4.0.1                                ...           2 years ago
  • 3.1.3                                ...           3 years ago
  • 3.1.2                                ...           4 years ago
  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           5 years ago
  • 3.0.1-1                                ...           5 years ago
  • 3.0.1-0                                ...           5 years ago
  • 3.0.0                                ...           7 years ago
  • 1.1.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.1.0 [deprecated]           ...           8 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.0-1                                ...           8 years ago
  • 1.0.1                                ...           8 years ago
  • 1.0.0-0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE