📄 rsakey.html
字号:
</DL></DD></DL><HR><A NAME="getSize()"><!-- --></A><H3>getSize</H3><PRE>public short <B>getSize</B>()</PRE><DL><DD>get Key length in bits<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/cipher/Key.html#getSize()">getSize</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getLength()"><!-- --></A><H3>getLength</H3><PRE>public int <B>getLength</B>()</PRE><DL><DD>get Key length in bytes<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/cipher/Key.html#getLength()">getLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getType()"><!-- --></A><H3>getType</H3><PRE>public byte <B>getType</B>()</PRE><DL><DD>Get key type<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/cipher/Key.html#getType()">getType</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/cipher/Key.html" title="interface in jxta.security.cipher">Key</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="equals(jxta.security.publickey.RSAPrivateKey)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A> key)</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#equals(jxta.security.publickey.RSAPrivateKey)">equals</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="equals(jxta.security.publickey.RSAPublicKey)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A> key)</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html#equals(jxta.security.publickey.RSAPublicKey)">equals</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="RSAEquals(jxta.security.impl.publickey.RSAKey, byte)"><!-- --></A><H3>RSAEquals</H3><PRE>public boolean <B>RSAEquals</B>(<A HREF="../../../../jxta/security/impl/publickey/RSAKey.html" title="class in jxta.security.impl.publickey">RSAKey</A> k, byte type)</PRE><DL><DD>Return true if key is equal to "this" key. Otherwise false. Here we can compare key type, lengths of the exponents and moduli, and finally the byte arrays themselves.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPublicExponentLength()"><!-- --></A><H3>getPublicExponentLength</H3><PRE>public int <B>getPublicExponentLength</B>()</PRE><DL><DD>get public exponent length e<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html#getPublicExponentLength()">getPublicExponentLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPrivateExponentLength()"><!-- --></A><H3>getPrivateExponentLength</H3><PRE>public int <B>getPrivateExponentLength</B>()</PRE><DL><DD>get private exponent length d = 1/e mod (p-1)(q-1)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getPrivateExponentLength()">getPrivateExponentLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getModulusLength()"><!-- --></A><H3>getModulusLength</H3><PRE>public int <B>getModulusLength</B>()</PRE><DL><DD>get modulus length, n Note: This may exceed the keysize in bytes by one byte. This is because big integer arithmetic will prepend a (byte)0x00 if the sign bit is set. Similarly for p, and q.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html#getModulusLength()">getModulusLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPrimePLength()"><!-- --></A><H3>getPrimePLength</H3><PRE>public int <B>getPrimePLength</B>()</PRE><DL><DD>Prime p<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getPrimePLength()">getPrimePLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPrimeQLength()"><!-- --></A><H3>getPrimeQLength</H3><PRE>public int <B>getPrimeQLength</B>()</PRE><DL><DD>Prime q<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getPrimeQLength()">getPrimeQLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPrimeExponentPLength()"><!-- --></A><H3>getPrimeExponentPLength</H3><PRE>public int <B>getPrimeExponentPLength</B>()</PRE><DL><DD>prime exponent, d mod (p-1)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getPrimeExponentPLength()">getPrimeExponentPLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getPrimeExponentQLength()"><!-- --></A><H3>getPrimeExponentQLength</H3><PRE>public int <B>getPrimeExponentQLength</B>()</PRE><DL><DD>prime exponent, d mod (q-1)<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getPrimeExponentQLength()">getPrimeExponentQLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getCrtCoefficientLength()"><!-- --></A><H3>getCrtCoefficientLength</H3><PRE>public int <B>getCrtCoefficientLength</B>()</PRE><DL><DD>Chinese remainder theorem coefficient 1/q mod p<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#getCrtCoefficientLength()">getCrtCoefficientLength</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setPublicExponent(byte[], int, int)"><!-- --></A><H3>setPublicExponent</H3><PRE>public void <B>setPublicExponent</B>(byte[] exp, int offset, int len) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Store the exponent as restricted by our size.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html#setPublicExponent(byte[], int, int)">setPublicExponent</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A></CODE></DL></DD><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="setPrivateExponent(byte[], int, int)"><!-- --></A><H3>setPrivateExponent</H3><PRE>public void <B>setPrivateExponent</B>(byte[] exp, int offset, int len) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></B></DD><DD>Given two primes, p and q, and [e,(p-1)(q-1)] = 1, n = pq Private Key: d = 1/e mod n c = m**d mod n, d is exponent, n modulus We also have methods to set parameters for the Chinese remainder theorem algorithm d mod p-1, d mod q-1, 1/q mod p<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html#setPrivateExponent(byte[], int, int)">setPrivateExponent</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPrivateKey.html" title="interface in jxta.security.publickey">RSAPrivateKey</A></CODE></DL></DD><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="setModulus(byte[], int, int)"><!-- --></A><H3>setModulus</H3><PRE>public void <B>setModulus</B>(byte[] mod, int offset, int len) throws <A HREF="../../../../jxta/security/exceptions/CryptoException.html" title="class in jxta.security.exceptions">CryptoException</A></PRE><DL><DD>Store the modulus as restricted by our size.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html#setModulus(byte[], int, int)">setModulus</A></CODE> in interface <CODE><A HREF="../../../../jxta/security/publickey/RSAPublicKey.html" title="interface in jxta.security.publickey">RSAPublicKey</A></CODE></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -