D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
OpenSSL
/
PKey
/
EC
/
Filename :
export-i.ri
back
Copy
U:RDoc::AnyMethod[iI"export:ETI"OpenSSL::PKey::EC#export;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I":Serializes a private or public key to a PEM-encoding.;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I"1When the key contains public components only;T; [o; ; [I"7Serializes it into an X.509 SubjectPublicKeyInfo. ;TI"8The parameters _cipher_ and _password_ are ignored.;T@o; ; [I"&A PEM-encoded key will look like:;T@o:RDoc::Markup::Verbatim; [I" -----BEGIN PUBLIC KEY----- ;TI"[...] ;TI"-----END PUBLIC KEY----- ;T:@format0o; ; [I"LConsider using #public_to_pem instead. This serializes the key into an ;TI"IX.509 SubjectPublicKeyInfo regardless of whether it is a public key ;TI"or a private key.;T@o;;[I"JWhen the key contains private components, and no parameters are given;T; [ o; ; [I"6Serializes it into a SEC 1/RFC 5915 ECPrivateKey.;T@o; ; [I"&A PEM-encoded key will look like:;T@o;; [I"$-----BEGIN EC PRIVATE KEY----- ;TI"[...] ;TI""-----END EC PRIVATE KEY----- ;T;0o;;[I"TWhen the key contains private components, and _cipher_ and _password_ are given;T; [o; ; [ I"6Serializes it into a SEC 1/RFC 5915 ECPrivateKey ;TI"Eand encrypts it in OpenSSL's traditional PEM encryption format. ;TI"L_cipher_ must be a cipher name understood by OpenSSL::Cipher.new or an ;TI"!instance of OpenSSL::Cipher.;T@o; ; [I"1An encrypted PEM-encoded key will look like:;T@o;; [I"$-----BEGIN EC PRIVATE KEY----- ;TI"Proc-Type: 4,ENCRYPTED ;TI"<DEK-Info: AES-128-CBC,733F5302505B34701FC41F5C0746E4C0 ;TI" ;TI"[...] ;TI""-----END EC PRIVATE KEY----- ;T;0o; ; [I"LNote that this format uses MD5 to derive the encryption key, and hence ;TI"5will not be available on FIPS-compliant systems.;T@o; ; [I"3<b>This method is kept for compatibility.</b> ;TI"MThis should only be used when the SEC 1/RFC 5915 ECPrivateKey format is ;TI"required.;T@o; ; [I"SConsider using #public_to_pem (X.509 SubjectPublicKeyInfo) or #private_to_pem ;TI"A(PKCS #8 PrivateKeyInfo or EncryptedPrivateKeyInfo) instead.;T: @fileI"ext/openssl/ossl_pkey_ec.c;T:0@omit_headings_from_table_of_contents_below0I"Wkey.export([cipher, password]) => String key.to_pem([cipher, password]) => String ;T0[[I"to_pem;T@ I"(*args);T@WFI"EC;TcRDoc::NormalClass00