📄 cryptoexception.html
字号:
</TABLE> <P><A NAME="jxta.security.impl.cipher"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2">Uses of <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A> in <A HREF="../../../../jxta/security/impl/cipher/package-summary.html">jxta.security.impl.cipher</A></FONT></TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Methods in <A HREF="../../../../jxta/security/impl/cipher/package-summary.html">jxta.security.impl.cipher</A> that throw <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>SecretKey.</B><B><A HREF="../../../../jxta/security/impl/cipher/SecretKey.html#setKey(byte[], int)">setKey</A></B>(byte[] buf, int off)</CODE><BR> Set the key into secret</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>RC4Cipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/RC4Cipher.html#init(jxta.security.cipher.Key, byte, byte[], int, int)">init</A></B>(<A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A> theKey, byte theMode, byte[] b, int off, int len)</CODE><BR> Initialize key. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>RC4Cipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/RC4Cipher.html#init(jxta.security.cipher.Key, byte)">init</A></B>(<A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A> theKey, byte theMode)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B>RC4Cipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/RC4Cipher.html#update(byte[], int, int, byte[], int)">update</A></B>(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)</CODE><BR> Call update only if one has multiple buffers to encrypt/decrypt</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B>RC4Cipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/RC4Cipher.html#doFinal(byte[], int, int, byte[], int)">doFinal</A></B>(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)</CODE><BR> Call here if you only have one buffer, or its the last buffer.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>NullCipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/NullCipher.html#init(jxta.security.cipher.Key, byte, byte[], int, int)">init</A></B>(<A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A> theKey, byte theMode, byte[] b, int off, int len)</CODE><BR> Key initialization (not used for RC4 since additional parameters are not required)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>NullCipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/NullCipher.html#init(jxta.security.cipher.Key, byte)">init</A></B>(<A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A> theKey, byte theMode)</CODE><BR> Initializes the cipher S based on the key Crypto code from Bruce Schneier</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B>NullCipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/NullCipher.html#update(byte[], int, int, byte[], int)">update</A></B>(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B>NullCipher.</B><B><A HREF="../../../../jxta/security/impl/cipher/NullCipher.html#doFinal(byte[], int, int, byte[], int)">doFinal</A></B>(byte[] inBuf, int inOff, int inLen, byte[] outBuf, int outOff)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A></CODE></FONT></TD><TD><CODE><B>KeyBuilder.</B><B><A HREF="../../../../jxta/security/impl/cipher/KeyBuilder.html#buildKey(byte, short, boolean)">buildKey</A></B>(byte keyType, short keyLength, boolean notUsed)</CODE><BR> Add new keytype above and add appropriate if statement below</TD></TR></TABLE> <P><A NAME="jxta.security.impl.crypto"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2">Uses of <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A> in <A HREF="../../../../jxta/security/impl/crypto/package-summary.html">jxta.security.impl.crypto</A></FONT></TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Methods in <A HREF="../../../../jxta/security/impl/crypto/package-summary.html">jxta.security.impl.crypto</A> that throw <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../jxta/security/cipher/Cipher.html" title="interface in jxta.security.cipher">Cipher</A></CODE></FONT></TD><TD><CODE><B>JxtaCryptoSuite.</B><B><A HREF="../../../../jxta/security/impl/crypto/JxtaCryptoSuite.html#getJxtaCipher(byte)">getJxtaCipher</A></B>(byte type)</CODE><BR> Only one cipher so far ..</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../jxta/security/hash/Hash.html" title="interface in jxta.security.hash">Hash</A></CODE></FONT></TD><TD><CODE><B>JxtaCryptoSuite.</B><B><A HREF="../../../../jxta/security/impl/crypto/JxtaCryptoSuite.html#getJxtaHash(byte)">getJxtaHash</A></B>(byte type)</CODE><BR> Use the following if just mutiple hashes have been requested.</TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Constructors in <A HREF="../../../../jxta/security/impl/crypto/package-summary.html">jxta.security.impl.crypto</A> that throw <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../jxta/security/impl/crypto/JxtaCryptoSuite.html#JxtaCryptoSuite(byte, jxta.security.impl.publickey.RSAKey, byte, byte)">JxtaCryptoSuite</A></B>(byte profileType, <A HREF="../../../../jxta/security/impl/publickey/RSAKey.html" title="class in jxta.security.impl.publickey">RSAKey</A> rKey, byte signatureType, byte macType)</CODE><BR> Our constructor Supported profiles: RSA + RC4 + SHA1</TD></TR></TABLE> <P><A NAME="jxta.security.impl.jxtasec"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2">Uses of <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A> in <A HREF="../../../../jxta/security/impl/jxtasec/package-summary.html">jxta.security.impl.jxtasec</A></FONT></TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TD COLSPAN=2>Methods in <A HREF="../../../../jxta/security/impl/jxtasec/package-summary.html">jxta.security.impl.jxtasec</A> that throw <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getOurRSAPublicKey()">getOurRSAPublicKey</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getSessionKey(byte[])">getSessionKey</A></B>(byte[] encodedRSApublicKey)</CODE><BR> 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. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#setSessionKey(byte[])">setSessionKey</A></B>(byte[] encryptedSKey)</CODE><BR> We have received a session key encrypted in our RSA public key and base64 encoded. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#decryptData(byte[])">decryptData</A></B>(byte[] data)</CODE><BR> Return data URLBase64 decoded, and then decrypted with the session key.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#encryptData(byte[])">encryptData</A></B>(byte[] data)</CODE><BR> Return data encrypted with the session key in URLBase64.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getRSAPublicKeyData()">getRSAPublicKeyData</A></B>()</CODE><BR> Get rsa public key data for local storage</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getRSAPrivateKeyData()">getRSAPrivateKeyData</A></B>()</CODE><BR> Get rsa private key data for local storage</TD></TR></TABLE> <P><A NAME="jxta.security.impl.mac"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -