/lib/bouncycastle/docs/org/bouncycastle/crypto/modes/GCMBlockCipher.html

https://bitbucket.org/arkban/somersault · HTML · 550 lines · 473 code · 55 blank · 22 comment · 0 complexity · 9db3a692198f62faef6e75a1bfdbb4f6 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0) on Mon Jan 11 13:46:36 EST 2010 -->
  6. <TITLE>
  7. GCMBlockCipher (Bouncy Castle Library 1.45 API Specification)
  8. </TITLE>
  9. <META NAME="date" CONTENT="2010-01-11">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="GCMBlockCipher (Bouncy Castle Library 1.45 API Specification)";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  40. </TR>
  41. </TABLE>
  42. </TD>
  43. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  44. <b>Bouncy Castle Cryptography Library 1.45</b></EM>
  45. </TD>
  46. </TR>
  47. <TR>
  48. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  49. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/modes/EAXBlockCipher.html" title="class in org.bouncycastle.crypto.modes"><B>PREV CLASS</B></A>&nbsp;
  50. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/modes/GOFBBlockCipher.html" title="class in org.bouncycastle.crypto.modes"><B>NEXT CLASS</B></A></FONT></TD>
  51. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  52. <A HREF="../../../../index.html?org/bouncycastle/crypto/modes/GCMBlockCipher.html" target="_top"><B>FRAMES</B></A> &nbsp;
  53. &nbsp;<A HREF="GCMBlockCipher.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  54. &nbsp;<SCRIPT type="text/javascript">
  55. <!--
  56. if(window==top) {
  57. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  58. }
  59. //-->
  60. </SCRIPT>
  61. <NOSCRIPT>
  62. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  63. </NOSCRIPT>
  64. </FONT></TD>
  65. </TR>
  66. <TR>
  67. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  68. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  69. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  70. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  71. </TR>
  72. </TABLE>
  73. <A NAME="skip-navbar_top"></A>
  74. <!-- ========= END OF TOP NAVBAR ========= -->
  75. <HR>
  76. <!-- ======== START OF CLASS DATA ======== -->
  77. <H2>
  78. <FONT SIZE="-1">
  79. org.bouncycastle.crypto.modes</FONT>
  80. <BR>
  81. Class GCMBlockCipher</H2>
  82. <PRE>
  83. java.lang.Object
  84. <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.bouncycastle.crypto.modes.GCMBlockCipher</B>
  85. </PRE>
  86. <DL>
  87. <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></DD>
  88. </DL>
  89. <HR>
  90. <DL>
  91. <DT><PRE>public class <B>GCMBlockCipher</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></DL>
  92. </PRE>
  93. <P>
  94. Implements the Galois/Counter mode (GCM) detailed in
  95. NIST Special Publication 800-38D.
  96. <P>
  97. <P>
  98. <HR>
  99. <P>
  100. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  101. <A NAME="constructor_summary"><!-- --></A>
  102. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  103. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  104. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  105. <B>Constructor Summary</B></FONT></TH>
  106. </TR>
  107. <TR BGCOLOR="white" CLASS="TableRowColor">
  108. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#GCMBlockCipher(org.bouncycastle.crypto.BlockCipher)">GCMBlockCipher</A></B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A>&nbsp;c)</CODE>
  109. <BR>
  110. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  111. </TR>
  112. <TR BGCOLOR="white" CLASS="TableRowColor">
  113. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#GCMBlockCipher(org.bouncycastle.crypto.BlockCipher, org.bouncycastle.crypto.modes.gcm.GCMMultiplier)">GCMBlockCipher</A></B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A>&nbsp;c,
  114. <A HREF="../../../../org/bouncycastle/crypto/modes/gcm/GCMMultiplier.html" title="interface in org.bouncycastle.crypto.modes.gcm">GCMMultiplier</A>&nbsp;m)</CODE>
  115. <BR>
  116. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  117. </TR>
  118. </TABLE>
  119. &nbsp;
  120. <!-- ========== METHOD SUMMARY =========== -->
  121. <A NAME="method_summary"><!-- --></A>
  122. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  123. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  124. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  125. <B>Method Summary</B></FONT></TH>
  126. </TR>
  127. <TR BGCOLOR="white" CLASS="TableRowColor">
  128. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  129. <CODE>&nbsp;int</CODE></FONT></TD>
  130. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#doFinal(byte[], int)">doFinal</A></B>(byte[]&nbsp;out,
  131. int&nbsp;outOff)</CODE>
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finish the operation either appending or verifying the MAC at the end of the data.</TD>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  137. <CODE>&nbsp;java.lang.String</CODE></FONT></TD>
  138. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#getAlgorithmName()">getAlgorithmName</A></B>()</CODE>
  139. <BR>
  140. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the name of the algorithm.</TD>
  141. </TR>
  142. <TR BGCOLOR="white" CLASS="TableRowColor">
  143. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  144. <CODE>&nbsp;byte[]</CODE></FONT></TD>
  145. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#getMac()">getMac</A></B>()</CODE>
  146. <BR>
  147. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the value of the MAC associated with the last stream processed.</TD>
  148. </TR>
  149. <TR BGCOLOR="white" CLASS="TableRowColor">
  150. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  151. <CODE>&nbsp;int</CODE></FONT></TD>
  152. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#getOutputSize(int)">getOutputSize</A></B>(int&nbsp;len)</CODE>
  153. <BR>
  154. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the size of the output buffer required for a processBytes plus a
  155. doFinal with an input of len bytes.</TD>
  156. </TR>
  157. <TR BGCOLOR="white" CLASS="TableRowColor">
  158. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  159. <CODE>&nbsp;<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A></CODE></FONT></TD>
  160. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#getUnderlyingCipher()">getUnderlyingCipher</A></B>()</CODE>
  161. <BR>
  162. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the cipher this object wraps.</TD>
  163. </TR>
  164. <TR BGCOLOR="white" CLASS="TableRowColor">
  165. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  166. <CODE>&nbsp;int</CODE></FONT></TD>
  167. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#getUpdateOutputSize(int)">getUpdateOutputSize</A></B>(int&nbsp;len)</CODE>
  168. <BR>
  169. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return the size of the output buffer required for a processBytes
  170. an input of len bytes.</TD>
  171. </TR>
  172. <TR BGCOLOR="white" CLASS="TableRowColor">
  173. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  174. <CODE>&nbsp;void</CODE></FONT></TD>
  175. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#init(boolean, org.bouncycastle.crypto.CipherParameters)">init</A></B>(boolean&nbsp;forEncryption,
  176. <A HREF="../../../../org/bouncycastle/crypto/CipherParameters.html" title="interface in org.bouncycastle.crypto">CipherParameters</A>&nbsp;params)</CODE>
  177. <BR>
  178. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initialise the underlying cipher.</TD>
  179. </TR>
  180. <TR BGCOLOR="white" CLASS="TableRowColor">
  181. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  182. <CODE>&nbsp;int</CODE></FONT></TD>
  183. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#processByte(byte, byte[], int)">processByte</A></B>(byte&nbsp;in,
  184. byte[]&nbsp;out,
  185. int&nbsp;outOff)</CODE>
  186. <BR>
  187. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;encrypt/decrypt a single byte.</TD>
  188. </TR>
  189. <TR BGCOLOR="white" CLASS="TableRowColor">
  190. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  191. <CODE>&nbsp;int</CODE></FONT></TD>
  192. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#processBytes(byte[], int, int, byte[], int)">processBytes</A></B>(byte[]&nbsp;in,
  193. int&nbsp;inOff,
  194. int&nbsp;len,
  195. byte[]&nbsp;out,
  196. int&nbsp;outOff)</CODE>
  197. <BR>
  198. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process a block of bytes from in putting the result into out.</TD>
  199. </TR>
  200. <TR BGCOLOR="white" CLASS="TableRowColor">
  201. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  202. <CODE>&nbsp;void</CODE></FONT></TD>
  203. <TD><CODE><B><A HREF="../../../../org/bouncycastle/crypto/modes/GCMBlockCipher.html#reset()">reset</A></B>()</CODE>
  204. <BR>
  205. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reset the cipher.</TD>
  206. </TR>
  207. </TABLE>
  208. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  209. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  210. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  211. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  212. </TR>
  213. <TR BGCOLOR="white" CLASS="TableRowColor">
  214. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  215. </TR>
  216. </TABLE>
  217. &nbsp;
  218. <P>
  219. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  220. <A NAME="constructor_detail"><!-- --></A>
  221. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  222. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  223. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  224. <B>Constructor Detail</B></FONT></TH>
  225. </TR>
  226. </TABLE>
  227. <A NAME="GCMBlockCipher(org.bouncycastle.crypto.BlockCipher)"><!-- --></A><H3>
  228. GCMBlockCipher</H3>
  229. <PRE>
  230. public <B>GCMBlockCipher</B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A>&nbsp;c)</PRE>
  231. <DL>
  232. </DL>
  233. <HR>
  234. <A NAME="GCMBlockCipher(org.bouncycastle.crypto.BlockCipher, org.bouncycastle.crypto.modes.gcm.GCMMultiplier)"><!-- --></A><H3>
  235. GCMBlockCipher</H3>
  236. <PRE>
  237. public <B>GCMBlockCipher</B>(<A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A>&nbsp;c,
  238. <A HREF="../../../../org/bouncycastle/crypto/modes/gcm/GCMMultiplier.html" title="interface in org.bouncycastle.crypto.modes.gcm">GCMMultiplier</A>&nbsp;m)</PRE>
  239. <DL>
  240. </DL>
  241. <!-- ============ METHOD DETAIL ========== -->
  242. <A NAME="method_detail"><!-- --></A>
  243. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  244. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  245. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  246. <B>Method Detail</B></FONT></TH>
  247. </TR>
  248. </TABLE>
  249. <A NAME="getUnderlyingCipher()"><!-- --></A><H3>
  250. getUnderlyingCipher</H3>
  251. <PRE>
  252. public <A HREF="../../../../org/bouncycastle/crypto/BlockCipher.html" title="interface in org.bouncycastle.crypto">BlockCipher</A> <B>getUnderlyingCipher</B>()</PRE>
  253. <DL>
  254. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getUnderlyingCipher()">AEADBlockCipher</A></CODE></B></DD>
  255. <DD>return the cipher this object wraps.
  256. <P>
  257. <DD><DL>
  258. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getUnderlyingCipher()">getUnderlyingCipher</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  259. </DD>
  260. <DD><DL>
  261. <DT><B>Returns:</B><DD>the cipher this object wraps.</DL>
  262. </DD>
  263. </DL>
  264. <HR>
  265. <A NAME="getAlgorithmName()"><!-- --></A><H3>
  266. getAlgorithmName</H3>
  267. <PRE>
  268. public java.lang.String <B>getAlgorithmName</B>()</PRE>
  269. <DL>
  270. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getAlgorithmName()">AEADBlockCipher</A></CODE></B></DD>
  271. <DD>Return the name of the algorithm.
  272. <P>
  273. <DD><DL>
  274. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getAlgorithmName()">getAlgorithmName</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  275. </DD>
  276. <DD><DL>
  277. <DT><B>Returns:</B><DD>the algorithm name.</DL>
  278. </DD>
  279. </DL>
  280. <HR>
  281. <A NAME="init(boolean, org.bouncycastle.crypto.CipherParameters)"><!-- --></A><H3>
  282. init</H3>
  283. <PRE>
  284. public void <B>init</B>(boolean&nbsp;forEncryption,
  285. <A HREF="../../../../org/bouncycastle/crypto/CipherParameters.html" title="interface in org.bouncycastle.crypto">CipherParameters</A>&nbsp;params)
  286. throws java.lang.IllegalArgumentException</PRE>
  287. <DL>
  288. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#init(boolean, org.bouncycastle.crypto.CipherParameters)">AEADBlockCipher</A></CODE></B></DD>
  289. <DD>initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.
  290. <P>
  291. <DD><DL>
  292. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#init(boolean, org.bouncycastle.crypto.CipherParameters)">init</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  293. </DD>
  294. <DD><DL>
  295. <DT><B>Parameters:</B><DD><CODE>forEncryption</CODE> - true if we are setting up for encryption, false otherwise.<DD><CODE>params</CODE> - the necessary parameters for the underlying cipher to be initialised.
  296. <DT><B>Throws:</B>
  297. <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the params argument is inappropriate.</DL>
  298. </DD>
  299. </DL>
  300. <HR>
  301. <A NAME="getMac()"><!-- --></A><H3>
  302. getMac</H3>
  303. <PRE>
  304. public byte[] <B>getMac</B>()</PRE>
  305. <DL>
  306. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getMac()">AEADBlockCipher</A></CODE></B></DD>
  307. <DD>Return the value of the MAC associated with the last stream processed.
  308. <P>
  309. <DD><DL>
  310. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getMac()">getMac</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  311. </DD>
  312. <DD><DL>
  313. <DT><B>Returns:</B><DD>MAC for plaintext data.</DL>
  314. </DD>
  315. </DL>
  316. <HR>
  317. <A NAME="getOutputSize(int)"><!-- --></A><H3>
  318. getOutputSize</H3>
  319. <PRE>
  320. public int <B>getOutputSize</B>(int&nbsp;len)</PRE>
  321. <DL>
  322. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getOutputSize(int)">AEADBlockCipher</A></CODE></B></DD>
  323. <DD>return the size of the output buffer required for a processBytes plus a
  324. doFinal with an input of len bytes.
  325. <P>
  326. <DD><DL>
  327. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getOutputSize(int)">getOutputSize</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  328. </DD>
  329. <DD><DL>
  330. <DT><B>Parameters:</B><DD><CODE>len</CODE> - the length of the input.
  331. <DT><B>Returns:</B><DD>the space required to accommodate a call to processBytes and doFinal
  332. with len bytes of input.</DL>
  333. </DD>
  334. </DL>
  335. <HR>
  336. <A NAME="getUpdateOutputSize(int)"><!-- --></A><H3>
  337. getUpdateOutputSize</H3>
  338. <PRE>
  339. public int <B>getUpdateOutputSize</B>(int&nbsp;len)</PRE>
  340. <DL>
  341. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getUpdateOutputSize(int)">AEADBlockCipher</A></CODE></B></DD>
  342. <DD>return the size of the output buffer required for a processBytes
  343. an input of len bytes.
  344. <P>
  345. <DD><DL>
  346. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#getUpdateOutputSize(int)">getUpdateOutputSize</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  347. </DD>
  348. <DD><DL>
  349. <DT><B>Parameters:</B><DD><CODE>len</CODE> - the length of the input.
  350. <DT><B>Returns:</B><DD>the space required to accommodate a call to processBytes
  351. with len bytes of input.</DL>
  352. </DD>
  353. </DL>
  354. <HR>
  355. <A NAME="processByte(byte, byte[], int)"><!-- --></A><H3>
  356. processByte</H3>
  357. <PRE>
  358. public int <B>processByte</B>(byte&nbsp;in,
  359. byte[]&nbsp;out,
  360. int&nbsp;outOff)
  361. throws <A HREF="../../../../org/bouncycastle/crypto/DataLengthException.html" title="class in org.bouncycastle.crypto">DataLengthException</A></PRE>
  362. <DL>
  363. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#processByte(byte, byte[], int)">AEADBlockCipher</A></CODE></B></DD>
  364. <DD>encrypt/decrypt a single byte.
  365. <P>
  366. <DD><DL>
  367. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#processByte(byte, byte[], int)">processByte</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  368. </DD>
  369. <DD><DL>
  370. <DT><B>Parameters:</B><DD><CODE>in</CODE> - the byte to be processed.<DD><CODE>out</CODE> - the output buffer the processed byte goes into.<DD><CODE>outOff</CODE> - the offset into the output byte array the processed data starts at.
  371. <DT><B>Returns:</B><DD>the number of bytes written to out.
  372. <DT><B>Throws:</B>
  373. <DD><CODE><A HREF="../../../../org/bouncycastle/crypto/DataLengthException.html" title="class in org.bouncycastle.crypto">DataLengthException</A></CODE> - if the output buffer is too small.</DL>
  374. </DD>
  375. </DL>
  376. <HR>
  377. <A NAME="processBytes(byte[], int, int, byte[], int)"><!-- --></A><H3>
  378. processBytes</H3>
  379. <PRE>
  380. public int <B>processBytes</B>(byte[]&nbsp;in,
  381. int&nbsp;inOff,
  382. int&nbsp;len,
  383. byte[]&nbsp;out,
  384. int&nbsp;outOff)
  385. throws <A HREF="../../../../org/bouncycastle/crypto/DataLengthException.html" title="class in org.bouncycastle.crypto">DataLengthException</A></PRE>
  386. <DL>
  387. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#processBytes(byte[], int, int, byte[], int)">AEADBlockCipher</A></CODE></B></DD>
  388. <DD>process a block of bytes from in putting the result into out.
  389. <P>
  390. <DD><DL>
  391. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#processBytes(byte[], int, int, byte[], int)">processBytes</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  392. </DD>
  393. <DD><DL>
  394. <DT><B>Parameters:</B><DD><CODE>in</CODE> - the input byte array.<DD><CODE>inOff</CODE> - the offset into the in array where the data to be processed starts.<DD><CODE>len</CODE> - the number of bytes to be processed.<DD><CODE>out</CODE> - the output buffer the processed bytes go into.<DD><CODE>outOff</CODE> - the offset into the output byte array the processed data starts at.
  395. <DT><B>Returns:</B><DD>the number of bytes written to out.
  396. <DT><B>Throws:</B>
  397. <DD><CODE><A HREF="../../../../org/bouncycastle/crypto/DataLengthException.html" title="class in org.bouncycastle.crypto">DataLengthException</A></CODE> - if the output buffer is too small.</DL>
  398. </DD>
  399. </DL>
  400. <HR>
  401. <A NAME="doFinal(byte[], int)"><!-- --></A><H3>
  402. doFinal</H3>
  403. <PRE>
  404. public int <B>doFinal</B>(byte[]&nbsp;out,
  405. int&nbsp;outOff)
  406. throws java.lang.IllegalStateException,
  407. <A HREF="../../../../org/bouncycastle/crypto/InvalidCipherTextException.html" title="class in org.bouncycastle.crypto">InvalidCipherTextException</A></PRE>
  408. <DL>
  409. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#doFinal(byte[], int)">AEADBlockCipher</A></CODE></B></DD>
  410. <DD>Finish the operation either appending or verifying the MAC at the end of the data.
  411. <P>
  412. <DD><DL>
  413. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#doFinal(byte[], int)">doFinal</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  414. </DD>
  415. <DD><DL>
  416. <DT><B>Parameters:</B><DD><CODE>out</CODE> - space for any resulting output data.<DD><CODE>outOff</CODE> - offset into out to start copying the data at.
  417. <DT><B>Returns:</B><DD>number of bytes written into out.
  418. <DT><B>Throws:</B>
  419. <DD><CODE>java.lang.IllegalStateException</CODE> - if the cipher is in an inappropriate state.
  420. <DD><CODE><A HREF="../../../../org/bouncycastle/crypto/InvalidCipherTextException.html" title="class in org.bouncycastle.crypto">InvalidCipherTextException</A></CODE> - if the MAC fails to match.</DL>
  421. </DD>
  422. </DL>
  423. <HR>
  424. <A NAME="reset()"><!-- --></A><H3>
  425. reset</H3>
  426. <PRE>
  427. public void <B>reset</B>()</PRE>
  428. <DL>
  429. <DD><B>Description copied from interface: <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#reset()">AEADBlockCipher</A></CODE></B></DD>
  430. <DD>Reset the cipher. After resetting the cipher is in the same state
  431. as it was after the last init (if there was one).
  432. <P>
  433. <DD><DL>
  434. <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html#reset()">reset</A></CODE> in interface <CODE><A HREF="../../../../org/bouncycastle/crypto/modes/AEADBlockCipher.html" title="interface in org.bouncycastle.crypto.modes">AEADBlockCipher</A></CODE></DL>
  435. </DD>
  436. <DD><DL>
  437. </DL>
  438. </DD>
  439. </DL>
  440. <!-- ========= END OF CLASS DATA ========= -->
  441. <HR>
  442. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  443. <A NAME="navbar_bottom"><!-- --></A>
  444. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  445. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  446. <TR>
  447. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  448. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  449. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  450. <TR ALIGN="center" VALIGN="top">
  451. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  452. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  453. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  454. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  455. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  456. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  457. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  458. </TR>
  459. </TABLE>
  460. </TD>
  461. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  462. <b>Bouncy Castle Cryptography Library 1.45</b></EM>
  463. </TD>
  464. </TR>
  465. <TR>
  466. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  467. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/modes/EAXBlockCipher.html" title="class in org.bouncycastle.crypto.modes"><B>PREV CLASS</B></A>&nbsp;
  468. &nbsp;<A HREF="../../../../org/bouncycastle/crypto/modes/GOFBBlockCipher.html" title="class in org.bouncycastle.crypto.modes"><B>NEXT CLASS</B></A></FONT></TD>
  469. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  470. <A HREF="../../../../index.html?org/bouncycastle/crypto/modes/GCMBlockCipher.html" target="_top"><B>FRAMES</B></A> &nbsp;
  471. &nbsp;<A HREF="GCMBlockCipher.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  472. &nbsp;<SCRIPT type="text/javascript">
  473. <!--
  474. if(window==top) {
  475. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  476. }
  477. //-->
  478. </SCRIPT>
  479. <NOSCRIPT>
  480. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  481. </NOSCRIPT>
  482. </FONT></TD>
  483. </TR>
  484. <TR>
  485. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  486. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  487. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  488. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  489. </TR>
  490. </TABLE>
  491. <A NAME="skip-navbar_bottom"></A>
  492. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  493. <HR>
  494. </BODY>
  495. </HTML>