mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-10-24 16:43:41 +00:00
Compare commits
1 Commits
ed25519-ke
...
docker-run
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f512d09227 |
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user