How to use the browserify-sign.createSign function in browserify-sign

To help you get started, we’ve selected a few browserify-sign 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 calvinmetcalf / native-crypto / browser / signature.js View on Github external
this.check = checkNative(this.type, this.algo, this.curve).then(function (answer) {
      _this.checking = false;
      if (answer) {
        _this.hasNative = true;
      } else {
        _this.hasNative = false;
        var algo = normalize(_this.algo, true);
        if (_this.curve) {
          _this.nodeCrypto = createHash(algo);
        } else if (_this.other) {
          _this.nodeCrypto = sign.createVerify('RSA-' + algo);
        } else {
          _this.nodeCrypto = sign.createSign('RSA-' + algo);
        }
        if (_this._cache && _this._cache.length) {
          _this._cache.forEach(function (thing) {
            _this.nodeCrypto.update(thing);
          });
          _this._cache = null;
        }
      }
    });
  }

browserify-sign

adds node crypto signing for browsers

ISC
Latest version published 10 months ago

Package Health Score

74 / 100
Full package analysis

Similar packages