UNPKG

keygentoolshed

Version:

Key generation utilities for cryptographic operations. QUANTUM ENCRYPTION FOLDER UPDATE!!! See its folder for all <3

11 lines (9 loc) 397 B
import crypto from 'crypto'; function generateKeyPair() { const { publicKey, privateKey } = crypto.generateKeyPairSync('rsa', { modulusLength: 2048, // Grandesa de la clau }); console.log('Public Key:\n', publicKey.export({ type: 'spki', format: 'pem' })); console.log('Private Key:\n', privateKey.export({ type: 'pkcs8', format: 'pem' })); } generateKeyPair();