Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
thread-self
/
root
/
opt
/
ruby-2.6
/
usr
/
share
/
ri
/
2.6.0
/
system
/
OpenSSL
/
PKey
/
DH
/
//proc/thread-self/root/opt/ruby-2.6/usr/share/ri/2.6.0/system/OpenSSL/PKey/DH/new-c.ri
U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::DH::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"PEither generates a DH instance from scratch or by reading already existing ;TI"LDH parameters from _string_. Note that when reading a DH instance from ;TI"Ndata that was encoded from a DH instance by using DH#to_pem or DH#to_der ;TI"Pthe result will *not* contain a public/private key pair yet. This needs to ;TI"/be generated using DH#generate_key! first.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Parameters;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"w_size_ is an integer representing the desired key size. Keys smaller than 1024 bits should be considered insecure.;To;;0; [o; ; [I"9_generator_ is a small number > 1, typically 2 or 5.;To;;0; [o; ; [I"2_string_ contains the DER or PEM encoded key.;T@S;; i;I" Examples;To:RDoc::Markup::Verbatim; [I"DH.new # -> dh ;TI"DH.new(1024) # -> dh ;TI"DH.new(1024, 5) # -> dh ;TI"#Reading DH parameters ;TI"Udh = DH.new(File.read('parameters.pem')) # -> dh, but no public/private key yet ;TI"9dh.generate_key! # -> dh with public and private key;T:@format0: @fileI"ext/openssl/ossl_pkey_dh.c;T:0@omit_headings_from_table_of_contents_below0I"HDH.new -> dh DH.new(string) -> dh DH.new(size [, generator]) -> dh ;T0[ I"(p1 = v1, p2 = v2);T@0FI"DH;TcRDoc::NormalClass00