Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aes-decrypter

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aes-decrypter

decrypt aes-128 content using a key

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
460K
decreased by-2.59%
Maintainers
1
Weekly downloads
 
Created
Source

decrypter

Table of Contents

Installation

npm install --save 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.

FAQs

Package last updated on 16 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc