Sha256: 00eca544aeff6690c25e190370c22c5a643764d3bad6c74fad643eaad2c16d4f

Contents?: true

Size: 231 Bytes

Versions: 14

Compression:

Stored size: 231 Bytes

Contents

var bn = require('bn.js');
function withPublic(paddedMsg, key) {
  return new Buffer(paddedMsg
    .toRed(bn.mont(key.modulus))
    .redPow(new bn(key.publicExponent))
    .fromRed()
    .toArray());
}

module.exports = withPublic;

Version data entries

14 entries across 14 versions & 7 rubygems

Version Path
optimacms-0.4.3 spec/dummy/node_modules/public-encrypt/withPublic.js
optimacms-0.4.2 spec/dummy/node_modules/public-encrypt/withPublic.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/public-encrypt/withPublic.js
locomotivecms-3.4.0 app/javascript/node_modules/public-encrypt/withPublic.js
cortex-0.1.3 spec/dummy/node_modules/public-encrypt/withPublic.js
dragonfly_puppeteer-0.1.0 node_modules/public-encrypt/withPublic.js
lanes-0.8.0 node_modules/public-encrypt/withPublic.js
minimum_viable_product-0.0.11 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.6 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.5 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.4 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.3 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.2 test/dummy/node_modules/public-encrypt/withPublic.js
brwy_rails-0.0.1 test/dummy/node_modules/public-encrypt/withPublic.js