generate(p1, p2 = v2) public

Creates a new DH instance from scratch by generating the private and public components alike.


  • size is an integer representing the desired key size. Keys smaller than 1024 bits should be considered insecure.

  • generator is a small number > 1, typically 2 or 5.

Show source
Register or log in to add new notes.