mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-22 07:46:15 -04:00
fix(rsa-key-pair-generator): correct prime web worker url
This commit is contained in:
parent
7c40539ef9
commit
f512d09227
1 changed files with 2 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
|||
import { pki } from 'node-forge';
|
||||
import workerScript from 'node-forge/dist/prime.worker.min?url';
|
||||
|
||||
export { generateKeyPair };
|
||||
|
||||
function generateRawPairs({ bits = 2048 }) {
|
||||
return new Promise<pki.rsa.KeyPair>((resolve, reject) =>
|
||||
pki.rsa.generateKeyPair({ bits }, (err, keyPair) => {
|
||||
pki.rsa.generateKeyPair({ bits, workerScript }, (err, keyPair) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue