How to use the DiffieHellmanGroup function from crypto

Find comprehensive JavaScript crypto.DiffieHellmanGroup code examples handpicked from public code repositorys.

-2
fork icon0
star icon0
watch icon0

+ 3 other calls in file

81
82
83
84
85
86
87
88
89
90
91
  assert(dh instanceof DiffieHellman, 'DiffieHellman is expected to return a ' +
                                      'new instance when called without `new`');
}


{
  const DiffieHellmanGroup = crypto.DiffieHellmanGroup;
  const dhg = DiffieHellmanGroup('modp5');
  assert(dhg instanceof DiffieHellmanGroup, 'DiffieHellmanGroup is expected ' +
                                            'to return a new instance when ' +
                                            'called without `new`');
fork icon0
star icon0
watch icon0

+ 6 other calls in file