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