⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cryptoexception.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</TABLE>&nbsp;<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>&nbsp;<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>&nbsp;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[]&nbsp;buf,       int&nbsp;off)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the key into secret</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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>&nbsp;theKey,     byte&nbsp;theMode,     byte[]&nbsp;b,     int&nbsp;off,     int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize key. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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>&nbsp;theKey,     byte&nbsp;theMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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[]&nbsp;inBuf,       int&nbsp;inOff,       int&nbsp;inLen,       byte[]&nbsp;outBuf,       int&nbsp;outOff)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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[]&nbsp;inBuf,        int&nbsp;inOff,        int&nbsp;inLen,        byte[]&nbsp;outBuf,        int&nbsp;outOff)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;theKey,     byte&nbsp;theMode,     byte[]&nbsp;b,     int&nbsp;off,     int&nbsp;len)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;theKey,     byte&nbsp;theMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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[]&nbsp;inBuf,       int&nbsp;inOff,       int&nbsp;inLen,       byte[]&nbsp;outBuf,       int&nbsp;outOff)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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[]&nbsp;inBuf,        int&nbsp;inOff,        int&nbsp;inLen,        byte[]&nbsp;outBuf,        int&nbsp;outOff)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<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&nbsp;keyType,         short&nbsp;keyLength,         boolean&nbsp;notUsed)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add new keytype above and add appropriate  if statement below</TD></TR></TABLE>&nbsp;<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>&nbsp;<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>&nbsp;<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&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only one cipher so far ..</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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&nbsp;type)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the following if just mutiple hashes have been requested.</TD></TR></TABLE>&nbsp;<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&nbsp;profileType,                <A HREF="../../../../jxta/security/impl/publickey/RSAKey.html" title="class in jxta.security.impl.publickey">RSAKey</A>&nbsp;rKey,                byte&nbsp;signatureType,                byte&nbsp;macType)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Our constructor Supported profiles:    RSA + RC4 + SHA1</TD></TR></TABLE>&nbsp;<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>&nbsp;<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>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getOurRSAPublicKey()">getOurRSAPublicKey</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#getSessionKey(byte[])">getSessionKey</A></B>(byte[]&nbsp;encodedRSApublicKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#setSessionKey(byte[])">setSessionKey</A></B>(byte[]&nbsp;encryptedSKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#decryptData(byte[])">decryptData</A></B>(byte[]&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;byte[]</CODE></FONT></TD><TD><CODE><B>JxtaSec1.</B><B><A HREF="../../../../jxta/security/impl/jxtasec/JxtaSec1.html#encryptData(byte[])">encryptData</A></B>(byte[]&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get rsa private key data for local storage</TD></TR></TABLE>&nbsp;<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 + -