UNPKG

node-jose-browserify

Version:

An advanced version of Cisco's node-jose module that works in both browser and the server.

22 lines (17 loc) 457 B
/*! * deps/ciphermodes/helpers.js - Cipher Helper Functions * * Copyright (c) 2015 Cisco Systems, Inc. See LICENSE file. */ "use strict"; 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 };