📄 signature.html
字号:
This algorithm generates an HMAC following the steps found in RFC: 2104 using SHA-256 as the hashing algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_HMAC_SHA_384">ALG_HMAC_SHA_384</A></B></CODE><BR> HMAC message authentication algorithm <code>ALG_HMAC_SHA_384</code> This algorithm generates an HMAC following the steps found in RFC: 2104 using SHA-384 as the hashing algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_HMAC_SHA_512">ALG_HMAC_SHA_512</A></B></CODE><BR> HMAC message authentication algorithm <code>ALG_HMAC_SHA_512</code> This algorithm generates an HMAC following the steps found in RFC: 2104 using SHA-512 as the hashing algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_HMAC_SHA1">ALG_HMAC_SHA1</A></B></CODE><BR> HMAC message authentication algorithm <code>ALG_HMAC_SHA1</code> This algorithm generates an HMAC following the steps found in RFC: 2104 using SHA1 as the hashing algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_KOREAN_SEED_MAC_NOPAD">ALG_KOREAN_SEED_MAC_NOPAD</A></B></CODE><BR> Signature algorithm <code>ALG_KOREAN_SEED_MAC_NOPAD</code> generates an 16-byte MAC using Korean SEED in CBC mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_MD5_PKCS1">ALG_RSA_MD5_PKCS1</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_MD5_PKCS1</code> generates a 16-byte MD5 digest, pads the digest according to the PKCS#1 (v1.5) scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_MD5_PKCS1_PSS">ALG_RSA_MD5_PKCS1_PSS</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_MD5_PKCS1_PSS</code> generates a 16-byte MD5 digest, pads it according to the PKCS#1-PSS scheme (IEEE 1363-2000), and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_MD5_RFC2409">ALG_RSA_MD5_RFC2409</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_MD5_RFC2409</code> generates a 16-byte MD5 digest, pads the digest according to the RFC2409 scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_RIPEMD160_ISO9796">ALG_RSA_RIPEMD160_ISO9796</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_RIPEMD160_ISO9796</code> generates a 20-byte RIPE MD-160 digest, pads the digest according to the ISO 9796 scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_RIPEMD160_ISO9796_MR">ALG_RSA_RIPEMD160_ISO9796_MR</A></B></CODE><BR> Signature algorithm<code>ALG_RSA_RIPEMD160_ISO9796_MR</code> generates 20-byte RIPE MD-160 digest, pads it according to the ISO9796-2 specification and encrypts using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_RIPEMD160_PKCS1">ALG_RSA_RIPEMD160_PKCS1</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_RIPEMD160_PKCS1</code> generates a 20-byte RIPE MD-160 digest, pads the digest according to the PKCS#1 (v1.5) scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_RIPEMD160_PKCS1_PSS">ALG_RSA_RIPEMD160_PKCS1_PSS</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_RIPEMD160_PKCS1_PSS</code> generates a 20-byte RIPE MD-160 digest, pads it according to the PKCS#1-PSS scheme (IEEE 1363-2000), and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_SHA_ISO9796">ALG_RSA_SHA_ISO9796</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_SHA_ISO9796</code> generates a 20-byte SHA digest, pads the digest according to the ISO 9796-2 scheme as specified in EMV '96 and EMV 2000, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_SHA_ISO9796_MR">ALG_RSA_SHA_ISO9796_MR</A></B></CODE><BR> Signature algorithm<code>ALG_RSA_SHA_ISO9796_MR</code> generates 20-byte SHA-1 digest, pads it according to the ISO9796-2 specification and encrypts using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_SHA_PKCS1">ALG_RSA_SHA_PKCS1</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_SHA_PKCS1</code> generates a 20-byte SHA digest, pads the digest according to the PKCS#1 (v1.5) scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_SHA_PKCS1_PSS">ALG_RSA_SHA_PKCS1_PSS</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_SHA_PKCS1_PSS</code> generates a 20-byte SHA-1 digest, pads it according to the PKCS#1-PSS scheme (IEEE 1363-2000), and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#ALG_RSA_SHA_RFC2409">ALG_RSA_SHA_RFC2409</A></B></CODE><BR> Signature algorithm <code>ALG_RSA_SHA_RFC2409</code> generates a 20-byte SHA digest, pads the digest according to the RFC2409 scheme, and encrypts it using RSA.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#MODE_SIGN">MODE_SIGN</A></B></CODE><BR> Used in <code>init()</code> methods to indicate signature sign mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#MODE_VERIFY">MODE_VERIFY</A></B></CODE><BR> Used in <code>init()</code> methods to indicate signature verify mode.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#Signature()">Signature</A></B>()</CODE><BR> Protected Constructor</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#getAlgorithm()">getAlgorithm</A></B>()</CODE><BR> Gets the Signature algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../javacard/security/Signature.html" title="class in javacard.security">Signature</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#getInstance(byte, boolean)">getInstance</A></B>(byte algorithm, boolean externalAccess)</CODE><BR> Creates a <code>Signature</code> object instance of the selected algorithm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#getLength()">getLength</A></B>()</CODE><BR> Returns the byte length of the signature data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#init(javacard.security.Key, byte)">init</A></B>(<A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A> theKey, byte theMode)</CODE><BR> Initializes the <code>Signature</code> object with the appropriate <code>Key</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#init(javacard.security.Key, byte, byte[], short, short)">init</A></B>(<A HREF="../../javacard/security/Key.html" title="interface in javacard.security">Key</A> theKey, byte theMode, byte[] bArray, short bOff, short bLen)</CODE><BR> Initializes the <code>Signature</code> object with the appropriate <code>Key</code> and algorithm specific parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract short</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#sign(byte[], short, short, byte[], short)">sign</A></B>(byte[] inBuff, short inOffset, short inLength, byte[] sigBuff, short sigOffset)</CODE><BR> Generates the signature of all/last input data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#update(byte[], short, short)">update</A></B>(byte[] inBuff, short inOffset, short inLength)</CODE><BR> Accumulates a signature of the input data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../javacard/security/Signature.html#verify(byte[], short, short, byte[], short, short)">verify</A></B>(byte[] inBuff, short inOffset, short inLength, byte[] sigBuff, short sigOffset, short sigLength)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -