// Import the crypto module
const crypto = require('crypto');
// Create a DiffieHellman instance
const dh = crypto.createDiffieHellman(2048); // 2048-bit prime length
console.log('DiffieHellman instance created successfully');
console.log('Prime length:', dh.getPrime().length * 8, 'bits');
DiffieHellman instance created successfully Prime length: 2048 bits