Source Code Cross Referenced for AEADBlockCipher.java in  » Security » Bouncy-Castle » org » bouncycastle » crypto » modes » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Security » Bouncy Castle » org.bouncycastle.crypto.modes 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.bouncycastle.crypto.modes;
002:
003:        import org.bouncycastle.crypto.BlockCipher;
004:        import org.bouncycastle.crypto.CipherParameters;
005:        import org.bouncycastle.crypto.DataLengthException;
006:        import org.bouncycastle.crypto.InvalidCipherTextException;
007:
008:        /**
009:         * A block cipher mode that includes authenticated encryption with a streaming mode and optional associated data.
010:         * @see org.bouncycastle.crypto.params.AEADParameters
011:         */
012:        public interface AEADBlockCipher {
013:            /**
014:             * initialise the underlying cipher. Parameter can either be an AEADParameters or a ParametersWithIV object.
015:             *
016:             * @param forEncryption true if we are setting up for encryption, false otherwise.
017:             * @param params the necessary parameters for the underlying cipher to be initialised.
018:             * @exception IllegalArgumentException if the params argument is inappropriate.
019:             */
020:            public void init(boolean forEncryption, CipherParameters params)
021:                    throws IllegalArgumentException;
022:
023:            /**
024:             * Return the name of the algorithm.
025:             * 
026:             * @return the algorithm name.
027:             */
028:            public String getAlgorithmName();
029:
030:            /**
031:             * return the cipher this object wraps.
032:             *
033:             * @return the cipher this object wraps.
034:             */
035:            public BlockCipher getUnderlyingCipher();
036:
037:            /**
038:             * encrypt/decrypt a single byte.
039:             *
040:             * @param in the byte to be processed.
041:             * @param out the output buffer the processed byte goes into.
042:             * @param outOff the offset into the output byte array the processed data starts at.
043:             * @return the number of bytes written to out.
044:             * @exception DataLengthException if the output buffer is too small.
045:             */
046:            public int processByte(byte in, byte[] out, int outOff)
047:                    throws DataLengthException;
048:
049:            /**
050:             * process a block of bytes from in putting the result into out.
051:             *
052:             * @param in the input byte array.
053:             * @param inOff the offset into the in array where the data to be processed starts.
054:             * @param len the number of bytes to be processed.
055:             * @param out the output buffer the processed bytes go into.
056:             * @param outOff the offset into the output byte array the processed data starts at.
057:             * @return the number of bytes written to out.
058:             * @exception DataLengthException if the output buffer is too small.
059:             */
060:            public int processBytes(byte[] in, int inOff, int len, byte[] out,
061:                    int outOff) throws DataLengthException;
062:
063:            /**
064:             * Finish the operation either appending or verifying the MAC at the end of the data.
065:             *
066:             * @param out space for any resulting output data.
067:             * @param outOff offset into out to start copying the data at.
068:             * @return number of bytes written into out.
069:             * @throws IllegalStateException if the cipher is in an inappropriate state.
070:             * @throws org.bouncycastle.crypto.InvalidCipherTextException if the MAC fails to match.
071:             */
072:            public int doFinal(byte[] out, int outOff)
073:                    throws IllegalStateException, InvalidCipherTextException;
074:
075:            /**
076:             * Return the value of the MAC associated with the last stream processed.
077:             *
078:             * @return MAC for plaintext data.
079:             */
080:            public byte[] getMac();
081:
082:            /**
083:             * return the size of the output buffer required for a processBytes
084:             * an input of len bytes.
085:             *
086:             * @param len the length of the input.
087:             * @return the space required to accommodate a call to processBytes
088:             * with len bytes of input.
089:             */
090:            public int getUpdateOutputSize(int len);
091:
092:            /**
093:             * return the size of the output buffer required for a processBytes plus a
094:             * doFinal with an input of len bytes.
095:             *
096:             * @param len the length of the input.
097:             * @return the space required to accommodate a call to processBytes and doFinal
098:             * with len bytes of input.
099:             */
100:            public int getOutputSize(int len);
101:
102:            /**
103:             * Reset the cipher. After resetting the cipher is in the same state
104:             * as it was after the last init (if there was one).
105:             */
106:            public void reset();
107:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.