D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
OpenSSL
/
PKey
/
RSA
/
Filename :
new-c.ri
back
Copy
U:RDoc::AnyMethod[iI"new:ETI"OpenSSL::PKey::RSA::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"(Generates or loads an \RSA keypair.;To:RDoc::Markup::BlankLine o; ; [I"PIf called without arguments, creates a new instance with no key components ;TI"Fset. They can be set individually by #set_key, #set_factors, and ;TI"#set_crt_params.;T@o; ; [ I"TIf called with a String, tries to parse as DER or PEM encoding of an \RSA key. ;TI"ONote that if _password_ is not specified, but the key is encrypted with a ;TI",password, \OpenSSL will prompt for it. ;TI"BSee also OpenSSL::PKey.read which can parse keys of any kind.;T@o; ; [I"NIf called with a number, generates a new key pair. This form works as an ;TI"alias of RSA.generate.;T@o; ; [I"Examples:;To:RDoc::Markup::Verbatim; [I"!OpenSSL::PKey::RSA.new 2048 ;TI"0OpenSSL::PKey::RSA.new File.read 'rsa.pem' ;TI"?OpenSSL::PKey::RSA.new File.read('rsa.pem'), 'my password';T:@format0: @fileI" ext/openssl/ossl_pkey_rsa.c;T:0@omit_headings_from_table_of_contents_below0I"�RSA.new -> rsa RSA.new(encoded_key [, password ]) -> rsa RSA.new(encoded_key) { password } -> rsa RSA.new(size [, exponent]) -> rsa ;T0[ I"(p1 = v1, p2 = v2);T@&FI"RSA;TcRDoc::NormalClass00