PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
OpenSSL
/
PKey
/
DH
U:RDoc::AnyMethod[iI"generate_key!:ETI"$OpenSSL::PKey::DH#generate_key!;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"MGenerates a private and public key unless a private key already exists. ;TI"KIf this DH instance was generated from public \DH parameters (e.g. by ;TI"Iencoding the result of DH#public_key), then this method needs to be ;TI"Ncalled first in order to generate the per-session keys before performing ;TI"the actual key exchange.;To:RDoc::Markup::BlankLine o; ; [I"H<b>Deprecated in version 3.0</b>. This method is incompatible with ;TI"OpenSSL 3.0.0 or later.;T@o; ; [I")See also OpenSSL::PKey.generate_key.;T@o; ; [I" Example:;To:RDoc::Markup::Verbatim; [I"D# DEPRECATED USAGE: This will not work on OpenSSL 3.0 or later ;TI"'dh0 = OpenSSL::PKey::DH.new(2048) ;TI"\dh = dh0.public_key # #public_key only copies the DH parameters (contrary to the name) ;TI"dh.generate_key! ;TI" puts dh.private? # => true ;TI".puts dh0.pub_key == dh.pub_key #=> false ;TI" ;TI"'# With OpenSSL::PKey.generate_key ;TI"'dh0 = OpenSSL::PKey::DH.new(2048) ;TI"*dh = OpenSSL::PKey.generate_key(dh0) ;TI"-puts dh0.pub_key == dh.pub_key #=> false;T:@format0: @fileI"$ext/openssl/lib/openssl/pkey.rb;T:0@omit_headings_from_table_of_contents_below0I"dh.generate_key! -> self ;T0[ I"();T@*FI"DH;TcRDoc::NormalClass00
[-] generate-c.ri
[edit]
[-] compute_key-i.ri
[edit]
[-] to_s-i.ri
[edit]
[-] initialize_copy-i.ri
[edit]
[-] cdesc-DH.ri
[edit]
[-] public_key-i.ri
[edit]
[-] new-c.ri
[edit]
[-] set_pqg-i.ri
[edit]
[-] private%3f-i.ri
[edit]
[-] public%3f-i.ri
[edit]
[-] to_der-i.ri
[edit]
[-] params_ok%3f-i.ri
[edit]
[-] params-i.ri
[edit]
[-] set_key-i.ri
[edit]
[-] to_pem-i.ri
[edit]
[-] generate_key%21-i.ri
[edit]
[+]
..
[-] export-i.ri
[edit]