node-jose
Version:
A JavaScript implementation of the JSON Object Signing and Encryption (JOSE) for current web browsers and node.js-based servers
22 lines (17 loc) • 457 B
JavaScript
/*!
* deps/ciphermodes/helpers.js - Cipher Helper Functions
*
* Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file.
*/
;
var pack = require("./pack.js");
function doEncrypt(cipher, inb, inOff, outb, outOff) {
var input = new Array(4),
output = new Array(4);
pack.bigEndianToInt(inb, inOff, input);
cipher.encrypt(input, output);
pack.intToBigEndian(output, outb, outOff);
}
module.exports = {
encrypt: doEncrypt
};