📄 jxtasec1.html
字号:
JxtaSec1</H3><PRE>public <B>JxtaSec1</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setDebug()"><!-- --></A><H3>setDebug</H3><PRE>public void <B>setDebug</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="clearDebug()"><!-- --></A><H3>clearDebug</H3><PRE>public void <B>clearDebug</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="jxtaSecInit()"><!-- --></A><H3>jxtaSecInit</H3><PRE>public boolean <B>jxtaSecInit</B>()</PRE><DL><DD>Initialize security variables<P><DD><DL></DL></DD></DL><HR><A NAME="jxtaSecInit(java.lang.Object, java.lang.Object)"><!-- --></A><H3>jxtaSecInit</H3><PRE>public boolean <B>jxtaSecInit</B>(java.lang.Object publicKeyData, java.lang.Object privateKeyData)</PRE><DL><DD>Initialize with previous RSA public/private key values<P><DD><DL></DL></DD></DL><HR><A NAME="getOurRSAPublicKey()"><!-- --></A><H3>getOurRSAPublicKey</H3><PRE>public byte[] <B>getOurRSAPublicKey</B>() throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="getSessionKey(byte[])"><!-- --></A><H3>getSessionKey</H3><PRE>public byte[] <B>getSessionKey</B>(byte[] encodedRSApublicKey) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>We have received an encoded RSA Public Key from the other peer: We return the session key as a base64 string encrpted in the other peers public key. The remote peer will use the session key we send for encrypting data.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="setSessionKey(byte[])"><!-- --></A><H3>setSessionKey</H3><PRE>public void <B>setSessionKey</B>(byte[] encryptedSKey) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>We have received a session key encrypted in our RSA public key and base64 encoded. We decrypt it, and set it as our symmetric session key for data.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="decryptData(byte[])"><!-- --></A><H3>decryptData</H3><PRE>public byte[] <B>decryptData</B>(byte[] data) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Return data URLBase64 decoded, and then decrypted with the session key.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="encryptData(byte[])"><!-- --></A><H3>encryptData</H3><PRE>public byte[] <B>encryptData</B>(byte[] data) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Return data encrypted with the session key in URLBase64.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="getRSAPublicKeyData()"><!-- --></A><H3>getRSAPublicKeyData</H3><PRE>public java.lang.Object <B>getRSAPublicKeyData</B>() throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Get rsa public key data for local storage<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="getRSAPrivateKeyData()"><!-- --></A><H3>getRSAPrivateKeyData</H3><PRE>public java.lang.Object <B>getRSAPrivateKeyData</B>() throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Get rsa private key data for local storage<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></CODE></DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Reset the object<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/JxtaSec1.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="JxtaSec1.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -