summaryrefslogtreecommitdiffstats
path: root/node_modules/public-encrypt/withPublic.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/public-encrypt/withPublic.js')
-rw-r--r--node_modules/public-encrypt/withPublic.js12
1 files changed, 0 insertions, 12 deletions
diff --git a/node_modules/public-encrypt/withPublic.js b/node_modules/public-encrypt/withPublic.js
deleted file mode 100644
index 417a1bf..0000000
--- a/node_modules/public-encrypt/withPublic.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var BN = require('bn.js')
-var Buffer = require('safe-buffer').Buffer
-
-function withPublic (paddedMsg, key) {
- return Buffer.from(paddedMsg
- .toRed(BN.mont(key.modulus))
- .redPow(new BN(key.publicExponent))
- .fromRed()
- .toArray())
-}
-
-module.exports = withPublic