method

new

v1_9_1_378 - Show latest stable - Class: OpenSSL::PKey::DH
new(p1 = v1, p2 = v2)
public

Parameters

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

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

  • string contains the DER or PEM encoded key.

Examples

  • DH.new -> dh

  • DH.new(1024) -> dh

  • DH.new(1024, 5) -> dh

  • DH.new(File.read(‘key.pem’)) -> dh