📄 cfbblockciphermac.html
字号:
<A NAME="CFBBlockCipherMac(org.bouncycastle.crypto.BlockCipher, org.bouncycastle.crypto.paddings.BlockCipherPadding)"><!-- --></A><H3>CFBBlockCipherMac</H3><PRE>public <B>CFBBlockCipherMac</B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A> cipher, <A HREF="../../../../org/bouncycastle/crypto/paddings/BlockCipherPadding.html" title="interface in org.bouncycastle.crypto.paddings">BlockCipherPadding</A> padding)</PRE><DL><DD>create a standard MAC based on a CFB block cipher. This will produce an authentication code half the length of the block size of the cipher, with the CFB mode set to 8 bits.<P><DL><DT><B>Parameters:</B><DD><CODE>cipher</CODE> - the cipher to be used as the basis of the MAC generation.<DD><CODE>padding</CODE> - the padding to be used.</DL></DL><HR><A NAME="CFBBlockCipherMac(org.bouncycastle.crypto.BlockCipher, int, int)"><!-- --></A><H3>CFBBlockCipherMac</H3><PRE>public <B>CFBBlockCipherMac</B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A> cipher, int cfbBitSize, int macSizeInBits)</PRE><DL><DD>create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CFB mode as the basis for the MAC generation. <p> Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), or 16 bits if being used as a data authenticator (FIPS Publication 113), and in general should be less than the size of the block cipher as it reduces the chance of an exhaustive attack (see Handbook of Applied Cryptography).<P><DL><DT><B>Parameters:</B><DD><CODE>cipher</CODE> - the cipher to be used as the basis of the MAC generation.<DD><CODE>cfbBitSize</CODE> - the size of an output block produced by the CFB mode.<DD><CODE>macSizeInBits</CODE> - the size of the MAC in bits, must be a multiple of 8.</DL></DL><HR><A NAME="CFBBlockCipherMac(org.bouncycastle.crypto.BlockCipher, int, int, org.bouncycastle.crypto.paddings.BlockCipherPadding)"><!-- --></A><H3>CFBBlockCipherMac</H3><PRE>public <B>CFBBlockCipherMac</B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A> cipher, int cfbBitSize, int macSizeInBits, <A HREF="../../../../org/bouncycastle/crypto/paddings/BlockCipherPadding.html" title="interface in org.bouncycastle.crypto.paddings">BlockCipherPadding</A> padding)</PRE><DL><DD>create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CFB mode as the basis for the MAC generation. <p> Note: the size of the MAC must be at least 24 bits (FIPS Publication 81), or 16 bits if being used as a data authenticator (FIPS Publication 113), and in general should be less than the size of the block cipher as it reduces the chance of an exhaustive attack (see Handbook of Applied Cryptography).<P><DL><DT><B>Parameters:</B><DD><CODE>cipher</CODE> - the cipher to be used as the basis of the MAC generation.<DD><CODE>cfbBitSize</CODE> - the size of an output block produced by the CFB mode.<DD><CODE>macSizeInBits</CODE> - the size of the MAC in bits, must be a multiple of 8.<DD><CODE>padding</CODE> - a padding to be used.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getAlgorithmName()"><!-- --></A><H3>getAlgorithmName</H3><PRE>public java.lang.String <B>getAlgorithmName</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#getAlgorithmName()">Mac</A></CODE></B></DD><DD>Return the name of the algorithm the MAC implements.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#getAlgorithmName()">getAlgorithmName</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the name of the algorithm the MAC implements.</DL></DD></DL><HR><A NAME="init(org.bouncycastle.crypto.CipherParameters)"><!-- --></A><H3>init</H3><PRE>public void <B>init</B>(<A HREF="../../../../org/bouncycastle/crypto/CipherParameters.html" title="interface in org.bouncycastle.crypto">CipherParameters</A> params)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#init(org.bouncycastle.crypto.CipherParameters)">Mac</A></CODE></B></DD><DD>Initialise the MAC.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#init(org.bouncycastle.crypto.CipherParameters)">init</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>params</CODE> - the key and other data required by the MAC.</DL></DD></DL><HR><A NAME="getMacSize()"><!-- --></A><H3>getMacSize</H3><PRE>public int <B>getMacSize</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#getMacSize()">Mac</A></CODE></B></DD><DD>Return the block size for this MAC (in bytes).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#getMacSize()">getMacSize</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the block size for this MAC in bytes.</DL></DD></DL><HR><A NAME="update(byte)"><!-- --></A><H3>update</H3><PRE>public void <B>update</B>(byte in)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#update(byte)">Mac</A></CODE></B></DD><DD>add a single byte to the mac for processing.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#update(byte)">update</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the byte to be processed.</DL></DD></DL><HR><A NAME="update(byte[], int, int)"><!-- --></A><H3>update</H3><PRE>public void <B>update</B>(byte[] in, int inOff, int len)</PRE><DL><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#update(byte[], int, int)">update</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the array containing the input.<DD><CODE>inOff</CODE> - the index in the array the data begins at.<DD><CODE>len</CODE> - the length of the input starting at inOff.</DL></DD></DL><HR><A NAME="doFinal(byte[], int)"><!-- --></A><H3>doFinal</H3><PRE>public int <B>doFinal</B>(byte[] out, int outOff)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#doFinal(byte[], int)">Mac</A></CODE></B></DD><DD>Compute the final statge of the MAC writing the output to the out parameter. <p> doFinal leaves the MAC in the same state it was after the last init.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#doFinal(byte[], int)">doFinal</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>out</CODE> - the array the MAC is to be output to.<DD><CODE>outOff</CODE> - the offset into the out buffer the output is to start at.</DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Reset the mac generator.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html#reset()">reset</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/Mac.html" title="interface in org.bouncycastle.crypto">Mac</A></CODE></DL></DD><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=2 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="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><b>Bouncy Castle Cryptography Library 1.38</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/bouncycastle/crypto/macs/CBCBlockCipherMac.html" title="class in org.bouncycastle.crypto.macs"><B>PREV CLASS</B></A> <A HREF="../../../../org/bouncycastle/crypto/macs/CMac.html" title="class in org.bouncycastle.crypto.macs"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/bouncycastle/crypto/macs/CFBBlockCipherMac.html" target="_top"><B>FRAMES</B></A> <A HREF="CFBBlockCipherMac.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 + -