/lib/bouncycastle/docs/org/bouncycastle/crypto/util/PrivateKeyFactory.html

https://bitbucket.org/arkban/somersault · HTML · 310 lines · 252 code · 36 blank · 22 comment · 0 complexity · bf3e7d0be078668778cbb743ea1ae9b6 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0) on Mon Jan 11 13:46:36 EST 2010 -->
  6. <TITLE>
  7. PrivateKeyFactory (Bouncy Castle Library 1.45 API Specification)
  8. </TITLE>
  9. <META NAME="date" CONTENT="2010-01-11">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="PrivateKeyFactory (Bouncy Castle Library 1.45 API Specification)";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. <b>Bouncy Castle Cryptography Library 1.45</b></EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/util/Pack.html" title="class in org.bouncycastle.crypto.util"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/util/PublicKeyFactory.html" title="class in org.bouncycastle.crypto.util"><B>NEXT CLASS</B></A></FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../../../index.html?org/bouncycastle/crypto/util/PrivateKeyFactory.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="PrivateKeyFactory.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. org.bouncycastle.crypto.util</FONT>
  80. <BR>
  81. Class PrivateKeyFactory</H2>
  82. <PRE>
  83. java.lang.Object
  84. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.bouncycastle.crypto.util.PrivateKeyFactory</B>
  85. </PRE>
  86. <HR>
  87. <DL>
  88. <DT><PRE>public class <B>PrivateKeyFactory</B><DT>extends java.lang.Object</DL>
  89. </PRE>
  90. <P>
  91. Factory for creating private key objects from PKCS8 PrivateKeyInfo objects.
  92. <P>
  93. <P>
  94. <HR>
  95. <P>
  96. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  97. <A NAME="constructor_summary"><!-- --></A>
  98. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  99. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  100. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  101. <B>Constructor Summary</B></FONT></TH>
  102. </TR>
  103. <TR BGCOLOR="white" CLASS="TableRowColor">
  104. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/util/PrivateKeyFactory.html#PrivateKeyFactory()">PrivateKeyFactory</A></B>()</CODE>
  105. <BR>
  106. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  107. </TR>
  108. </TABLE>
  109. &nbsp;
  110. <!-- ========== METHOD SUMMARY =========== -->
  111. <A NAME="method_summary"><!-- --></A>
  112. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  113. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  114. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  115. <B>Method Summary</B></FONT></TH>
  116. </TR>
  117. <TR BGCOLOR="white" CLASS="TableRowColor">
  118. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  119. <CODE>static&nbsp;<A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A></CODE></FONT></TD>
  120. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/util/PrivateKeyFactory.html#createKey(byte[])">createKey</A></B>(byte[]&nbsp;privateKeyInfoData)</CODE>
  121. <BR>
  122. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a private key parameter from a PKCS8 PrivateKeyInfo encoding.</TD>
  123. </TR>
  124. <TR BGCOLOR="white" CLASS="TableRowColor">
  125. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  126. <CODE>static&nbsp;<A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A></CODE></FONT></TD>
  127. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/util/PrivateKeyFactory.html#createKey(java.io.InputStream)">createKey</A></B>(java.io.InputStream&nbsp;inStr)</CODE>
  128. <BR>
  129. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream.</TD>
  130. </TR>
  131. <TR BGCOLOR="white" CLASS="TableRowColor">
  132. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  133. <CODE>static&nbsp;<A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A></CODE></FONT></TD>
  134. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/util/PrivateKeyFactory.html#createKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo)">createKey</A></B>(<A HREF="../../../../org/bouncycastle/asn1/pkcs/PrivateKeyInfo.html" title="class in org.bouncycastle.asn1.pkcs">PrivateKeyInfo</A>&nbsp;keyInfo)</CODE>
  135. <BR>
  136. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a private key parameter from the passed in PKCS8 PrivateKeyInfo object.</TD>
  137. </TR>
  138. </TABLE>
  139. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  140. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  141. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  142. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  143. </TR>
  144. <TR BGCOLOR="white" CLASS="TableRowColor">
  145. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  146. </TR>
  147. </TABLE>
  148. &nbsp;
  149. <P>
  150. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  151. <A NAME="constructor_detail"><!-- --></A>
  152. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  153. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  154. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  155. <B>Constructor Detail</B></FONT></TH>
  156. </TR>
  157. </TABLE>
  158. <A NAME="PrivateKeyFactory()"><!-- --></A><H3>
  159. PrivateKeyFactory</H3>
  160. <PRE>
  161. public <B>PrivateKeyFactory</B>()</PRE>
  162. <DL>
  163. </DL>
  164. <!-- ============ METHOD DETAIL ========== -->
  165. <A NAME="method_detail"><!-- --></A>
  166. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  167. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  168. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  169. <B>Method Detail</B></FONT></TH>
  170. </TR>
  171. </TABLE>
  172. <A NAME="createKey(byte[])"><!-- --></A><H3>
  173. createKey</H3>
  174. <PRE>
  175. public static <A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A> <B>createKey</B>(byte[]&nbsp;privateKeyInfoData)
  176. throws java.io.IOException</PRE>
  177. <DL>
  178. <DD>Create a private key parameter from a PKCS8 PrivateKeyInfo encoding.
  179. <P>
  180. <DD><DL>
  181. <DT><B>Parameters:</B><DD><CODE>privateKeyInfoData</CODE> - the PrivateKeyInfo encoding
  182. <DT><B>Returns:</B><DD>a suitable private key parameter
  183. <DT><B>Throws:</B>
  184. <DD><CODE>java.io.IOException</CODE> - on an error decoding the key</DL>
  185. </DD>
  186. </DL>
  187. <HR>
  188. <A NAME="createKey(java.io.InputStream)"><!-- --></A><H3>
  189. createKey</H3>
  190. <PRE>
  191. public static <A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A> <B>createKey</B>(java.io.InputStream&nbsp;inStr)
  192. throws java.io.IOException</PRE>
  193. <DL>
  194. <DD>Create a private key parameter from a PKCS8 PrivateKeyInfo encoding read from a stream.
  195. <P>
  196. <DD><DL>
  197. <DT><B>Parameters:</B><DD><CODE>inStr</CODE> - the stream to read the PrivateKeyInfo encoding from
  198. <DT><B>Returns:</B><DD>a suitable private key parameter
  199. <DT><B>Throws:</B>
  200. <DD><CODE>java.io.IOException</CODE> - on an error decoding the key</DL>
  201. </DD>
  202. </DL>
  203. <HR>
  204. <A NAME="createKey(org.bouncycastle.asn1.pkcs.PrivateKeyInfo)"><!-- --></A><H3>
  205. createKey</H3>
  206. <PRE>
  207. public static <A HREF="../../../../org/bouncycastle/crypto/params/AsymmetricKeyParameter.html" title="class in org.bouncycastle.crypto.params">AsymmetricKeyParameter</A> <B>createKey</B>(<A HREF="../../../../org/bouncycastle/asn1/pkcs/PrivateKeyInfo.html" title="class in org.bouncycastle.asn1.pkcs">PrivateKeyInfo</A>&nbsp;keyInfo)
  208. throws java.io.IOException</PRE>
  209. <DL>
  210. <DD>Create a private key parameter from the passed in PKCS8 PrivateKeyInfo object.
  211. <P>
  212. <DD><DL>
  213. <DT><B>Parameters:</B><DD><CODE>keyInfo</CODE> - the PrivateKeyInfo object containing the key material
  214. <DT><B>Returns:</B><DD>a suitable private key parameter
  215. <DT><B>Throws:</B>
  216. <DD><CODE>java.io.IOException</CODE> - on an error decoding the key</DL>
  217. </DD>
  218. </DL>
  219. <!-- ========= END OF CLASS DATA ========= -->
  220. <HR>
  221. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  222. <A NAME="navbar_bottom"><!-- --></A>
  223. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  224. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  225. <TR>
  226. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  227. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  228. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  229. <TR ALIGN="center" VALIGN="top">
  230. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  231. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  232. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  233. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  234. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  235. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  236. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  237. </TR>
  238. </TABLE>
  239. </TD>
  240. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  241. <b>Bouncy Castle Cryptography Library 1.45</b></EM>
  242. </TD>
  243. </TR>
  244. <TR>
  245. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  246. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/util/Pack.html" title="class in org.bouncycastle.crypto.util"><B>PREV CLASS</B></A>&nbsp;
  247. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/util/PublicKeyFactory.html" title="class in org.bouncycastle.crypto.util"><B>NEXT CLASS</B></A></FONT></TD>
  248. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  249. <A HREF="../../../../index.html?org/bouncycastle/crypto/util/PrivateKeyFactory.html" target="_top"><B>FRAMES</B></A> &nbsp;
  250. &nbsp;<A HREF="PrivateKeyFactory.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  251. &nbsp;<SCRIPT type="text/javascript">
  252. <!--
  253. if(window==top) {
  254. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  255. }
  256. //-->
  257. </SCRIPT>
  258. <NOSCRIPT>
  259. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  260. </NOSCRIPT>
  261. </FONT></TD>
  262. </TR>
  263. <TR>
  264. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  265. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  266. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  267. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  268. </TR>
  269. </TABLE>
  270. <A NAME="skip-navbar_bottom"></A>
  271. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  272. <HR>
  273. </BODY>
  274. </HTML>