first commit
This commit is contained in:
10
build/node_modules/public-encrypt/withPublic.js
generated
vendored
Normal file
10
build/node_modules/public-encrypt/withPublic.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user