\doxysection{Qore\+::SSLPrivate\+Key Class Reference}
\hypertarget{class_qore_1_1_s_s_l_private_key}{}\label{class_qore_1_1_s_s_l_private_key}\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}


This class implements a container for private key data.  




{\ttfamily \#include $<$QC\+\_\+\+SSLPrivate\+Key.\+dox.\+h$>$}



Inheritance diagram for Qore\+::SSLPrivate\+Key\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{class_qore_1_1_s_s_l_private_key__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_affdb0026e65213516c7d088074d1aec2}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{pem}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{pass}})
\begin{DoxyCompactList}\small\item\em Creates the \doxylink{class_qore_1_1_s_s_l_private_key}{SSLPrivate\+Key} object from the PEM-\/encoded text representation of the private key passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_a7310bce372479a38a90dbc521710256e}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{der}})
\begin{DoxyCompactList}\small\item\em Creates the \doxylink{class_qore_1_1_s_s_l_private_key}{SSLPrivate\+Key} object from the data argument passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_abc635ed38e5d73865bbc356267b6d26e}{copy}} ()
\begin{DoxyCompactList}\small\item\em Returns a copy of the private key object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_aa21b2182522c30d4ce8fdd31479f946e}{get\+Bit\+Length}} ()
\begin{DoxyCompactList}\small\item\em Returns the bit length of the private key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_af6efb915453871f442bed6554a30b156}{get\+DER}} ()
\begin{DoxyCompactList}\small\item\em Returns a binary object in DER format representing the private key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} $>$ \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_a48582611b851d268dafd0feb9b00d159}{get\+Info}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash of all information for the private key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_a9e95fdac083338d89e1806a4409e6e22}{get\+PEM}} ()
\begin{DoxyCompactList}\small\item\em Returns a string in PEM format representing the private key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_ab6a45cf567fddcc9c36e7d0fe2b956fb}{get\+Type}} ()
\begin{DoxyCompactList}\small\item\em Returns a string giving the algorithm used for the private key. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_s_s_l_private_key_a61566e34227646a2d1a6a992f5aeb994}{get\+Version}} ()
\begin{DoxyCompactList}\small\item\em Returns a constant value of 1; do not use; only included for backwards-\/compatibility. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_serializable}{Qore\+::\+Serializable}}}
\begin{DoxyCompactItemize}
\item 
{\bfseries constructor} ()
\begin{DoxyCompactList}\small\item\em The constructor does not perform any action; this class is just used to mark a class as serializable by inheriting this class. \end{DoxyCompactList}\item 
{\bfseries copy} ()
\begin{DoxyCompactList}\small\item\em The copy constructor does not perform any action; this class is just used to mark a class as serializable by inheriting this class. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize}} (\mbox{\hyperlink{class_qore_1_1_output_stream}{Output\+Stream}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{stream}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em converts the object to binary data representing the object \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_serializable_a139b4731ccd70bbaeb9deb29c6a40fbd}{serialize}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em converts the object to binary data representing the object \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_serialization_info}{Serialization\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_serializable_ace8d5cb897a7ea7ddfbbb46c4f83e6f1}{serialize\+To\+Data}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em converts the object to a serialization hash representing the object \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Additional Inherited Members}
\doxysubsection*{Static Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_serializable}{Qore\+::\+Serializable}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_serializable_a3f44c358c004bff3d010d977e8b6cfc2}{deserialize}} (\mbox{\hyperlink{class_qore_1_1_input_stream}{Input\+Stream}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{stream}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_serializable_a4f31399daa6699c02b8c1aa963275467}{deserialize}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bin}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_serializable_a3ed9a5aaabf3146f4077c88ec783b27b}{deserialize}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bin}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_serializable_a768b617c52d7a366d79f58f787416021}{deserialize}} (\mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_serialization_info}{Serialization\+Info}} $>$ data, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_ace8d5cb897a7ea7ddfbbb46c4f83e6f1}{serialize\+To\+Data()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_serialization_info}{Serialization\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_serializable_ad3eb79351fcc21abc9d932381fbbdcc0}{deserialize\+To\+Data}} (\mbox{\hyperlink{class_qore_1_1_input_stream}{Input\+Stream}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{stream}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_serialization_info}{Serialization\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_serializable_a8ea2349e72395be35cd2db71cce17370}{deserialize\+To\+Data}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bin}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em Deserializes data produced with \doxylink{class_qore_1_1_serializable_a832ad3eeac2f16fd41b62db4298b201d}{serialize()} and returns the value represented by the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{class_qore_1_1_serializable_afeed402d2c91241ce684cced80ee38ba}{serialize}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} val, \mbox{\hyperlink{class_qore_1_1_output_stream}{Output\+Stream}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{stream}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em serializes the data and writes the serialized data to the given output stream \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_serializable_abc7819ea69f6973f534323758eb6fe01}{serialize}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} val, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em serializes the data and returns the serialized data as a binary object \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{static}} \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_serialization_info}{Serialization\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_serializable_ae8ff1cfee8e78626dff3d611c8ee19c6}{serialize\+To\+Data}} (\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} val, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{flags}})
\begin{DoxyCompactList}\small\item\em converts the value to a serialization hash representing the value \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class implements a container for private key data. 

The \doxylink{class_qore_1_1_s_s_l_private_key}{SSLPrivate\+Key} class supports \doxylink{class_qore_1_1_serializable}{data serialization}; note that the serialized data is a representation of the data that does not require a password, so for source data that requires a password to use, the serialized representation of the private key should be protected carefully (transmitted only in an encrypted stream) 

\doxysubsection{Member Function Documentation}
\Hypertarget{class_qore_1_1_s_s_l_private_key_a7310bce372479a38a90dbc521710256e}\label{class_qore_1_1_s_s_l_private_key_a7310bce372479a38a90dbc521710256e} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Qore\+::\+SSLPrivate\+Key\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{der }\end{DoxyParamCaption})}



Creates the \doxylink{class_qore_1_1_s_s_l_private_key}{SSLPrivate\+Key} object from the data argument passed. 


\begin{DoxyParams}{Parameters}
{\em der} & The DER-\/encoded binary representation of the private key\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{SSLPrivateKey\ key(der);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SSLPRIVATEKEY-\/\+CONSTRUCTOR-\/\+ERROR} & error in private key data \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_s_s_l_private_key_affdb0026e65213516c7d088074d1aec2}\label{class_qore_1_1_s_s_l_private_key_affdb0026e65213516c7d088074d1aec2} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Qore\+::\+SSLPrivate\+Key\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{pem,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{pass }\end{DoxyParamCaption})}



Creates the \doxylink{class_qore_1_1_s_s_l_private_key}{SSLPrivate\+Key} object from the PEM-\/encoded text representation of the private key passed. 


\begin{DoxyParams}{Parameters}
{\em pem} & The PEM-\/encoded text representation of the private key \\
\hline
{\em pass} & The optional password or passphrase for the private key\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{SSLPrivateKey\ key(pem);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em SSLPRIVATEKEY-\/\+CONSTRUCTOR-\/\+ERROR} & error in private key data\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
0.\+8.\+4\+: the deprecated functionality where the if the string passed was less than 200 bytes long, it was assumed to be a file name has been removed; the string is assumed to be the PEM-\/encoded private key itself 
\end{DoxySince}
\Hypertarget{class_qore_1_1_s_s_l_private_key_abc635ed38e5d73865bbc356267b6d26e}\label{class_qore_1_1_s_s_l_private_key_abc635ed38e5d73865bbc356267b6d26e} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!copy@{copy}}
\index{copy@{copy}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+SSLPrivate\+Key\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a copy of the private key object. 

\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\Hypertarget{class_qore_1_1_s_s_l_private_key_aa21b2182522c30d4ce8fdd31479f946e}\label{class_qore_1_1_s_s_l_private_key_aa21b2182522c30d4ce8fdd31479f946e} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getBitLength@{getBitLength}}
\index{getBitLength@{getBitLength}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getBitLength()}{getBitLength()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+SSLPrivate\+Key\+::get\+Bit\+Length (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the bit length of the private key. 

\begin{DoxyReturn}{Returns}
the bit length of the private key
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int\ len\ =\ key.getBitLength();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_s_s_l_private_key_af6efb915453871f442bed6554a30b156}\label{class_qore_1_1_s_s_l_private_key_af6efb915453871f442bed6554a30b156} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getDER@{getDER}}
\index{getDER@{getDER}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getDER()}{getDER()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::\+SSLPrivate\+Key\+::get\+DER (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a binary object in DER format representing the private key. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{binary\ der\ =\ key.getDER();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a binary object in DER format representing the private key
\end{DoxyReturn}
\begin{DoxyNote}{Note}
No password is required to use the DER data produced even if the object was originally created with a password
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em SSLPRIVATEKEY-\/\+ERROR} & could not create DER data from private key data\\
\hline
\end{DoxyExceptions}
\begin{DoxySince}{Since}
Qore 0.\+9 
\end{DoxySince}
\Hypertarget{class_qore_1_1_s_s_l_private_key_a48582611b851d268dafd0feb9b00d159}\label{class_qore_1_1_s_s_l_private_key_a48582611b851d268dafd0feb9b00d159} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getInfo@{getInfo}}
\index{getInfo@{getInfo}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getInfo()}{getInfo()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} $>$ Qore\+::\+SSLPrivate\+Key\+::get\+Info (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a hash of all information for the private key. 

\begin{DoxyReturn}{Returns}
a hash of all information for the private key with the following keys\+:
\begin{DoxyItemize}
\item {\ttfamily "{}type"{}}\+: The type of private key (see \doxylink{class_qore_1_1_s_s_l_private_key_ab6a45cf567fddcc9c36e7d0fe2b956fb}{SSLPrivate\+Key\+::get\+Type()})
\item {\ttfamily "{}version"{}}\+: The version of the private key (see \doxylink{class_qore_1_1_s_s_l_private_key_a61566e34227646a2d1a6a992f5aeb994}{SSLPrivate\+Key\+::get\+Version()})
\item {\ttfamily "{}bit\+Length"{}}\+: The bit length of the private key (see \doxylink{class_qore_1_1_s_s_l_private_key_aa21b2182522c30d4ce8fdd31479f946e}{SSLPrivate\+Key\+::get\+Bit\+Length()})
\end{DoxyItemize}
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{hash<auto>\ h\ =\ key.getInfo();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_s_s_l_private_key_a9e95fdac083338d89e1806a4409e6e22}\label{class_qore_1_1_s_s_l_private_key_a9e95fdac083338d89e1806a4409e6e22} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getPEM@{getPEM}}
\index{getPEM@{getPEM}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getPEM()}{getPEM()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SSLPrivate\+Key\+::get\+PEM (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string in PEM format representing the private key. 

\begin{DoxyReturn}{Returns}
a string in PEM format representing the private key
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ pem\ =\ key.getPEM();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
No password is required to use the PEM data produced even if the object was originally created with a password
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em SSLPRIVATEKEY-\/\+ERROR} & could not create PEM string from private key data \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_s_s_l_private_key_ab6a45cf567fddcc9c36e7d0fe2b956fb}\label{class_qore_1_1_s_s_l_private_key_ab6a45cf567fddcc9c36e7d0fe2b956fb} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getType@{getType}}
\index{getType@{getType}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getType()}{getType()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+SSLPrivate\+Key\+::get\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a string giving the algorithm used for the private key. 

\begin{DoxyReturn}{Returns}
a string giving the algorithm used for the private key (ex\+: {\ttfamily "{}\+RSA"{}}, {\ttfamily "{}\+RSA2"{}}, {\ttfamily "{}\+DSA"{}}, {\ttfamily "{}\+DSA1"{}}, {\ttfamily "{}\+DSA2"{}}, {\ttfamily "{}\+DAS3"{}}, {\ttfamily "{}\+DAS4"{}}, {\ttfamily "{}\+DH"{}}, {\ttfamily "{}unknown"{}})
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ str\ =\ pkey.getType();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_s_s_l_private_key_a61566e34227646a2d1a6a992f5aeb994}\label{class_qore_1_1_s_s_l_private_key_a61566e34227646a2d1a6a992f5aeb994} 
\index{Qore::SSLPrivateKey@{Qore::SSLPrivateKey}!getVersion@{getVersion}}
\index{getVersion@{getVersion}!Qore::SSLPrivateKey@{Qore::SSLPrivateKey}}
\doxysubsubsection{\texorpdfstring{getVersion()}{getVersion()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+SSLPrivate\+Key\+::get\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a constant value of 1; do not use; only included for backwards-\/compatibility. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
The openssl library never put any usable value into the internal fields that were used to provide this information; newer versions of openssl do not expose this information at all, therefore this method now returns a constant value of 1 for backwards-\/compatibility.

\begin{DoxyReturn}{Returns}
a constant value of 1; do not use; only included for backwards-\/compatibility 
\end{DoxyReturn}
