How to use the jsbn/lib/sha1.HMAC function in jsbn

To help you get started, we’ve selected a few jsbn examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wowserhq / wowser / lib / client / crypto / crypt.js View on Github external
'use strict';

var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

var ArrayUtil = require('../utils/array-util');

var _require = require('jsbn/lib/sha1');

var HMAC = _require.HMAC;

var RC4 = require('jsbn/lib/rc4');

module.exports = (function () {

  // Creates crypt

  function Crypt() {
    _classCallCheck(this, Crypt);

    // RC4's for encryption and decryption
    this._encrypt = null;
    this._decrypt = null;
  }

  _createClass(Crypt, [{

jsbn

The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.

MIT
Latest version published 7 years ago

Package Health Score

67 / 100
Full package analysis