Source Code Cross Referenced for JDKMessageDigest.java in  » Security » Bouncy-Castle » org » bouncycastle » jce » provider » 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.jce.provider 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.bouncycastle.jce.provider;
002:
003:        import java.security.MessageDigest;
004:
005:        import org.bouncycastle.crypto.Digest;
006:        import org.bouncycastle.crypto.digests.*;
007:
008:        public class JDKMessageDigest extends MessageDigest {
009:            Digest digest;
010:
011:            protected JDKMessageDigest(Digest digest) {
012:                super (digest.getAlgorithmName());
013:
014:                this .digest = digest;
015:            }
016:
017:            public void engineReset() {
018:                digest.reset();
019:            }
020:
021:            public void engineUpdate(byte input) {
022:                digest.update(input);
023:            }
024:
025:            public void engineUpdate(byte[] input, int offset, int len) {
026:                digest.update(input, offset, len);
027:            }
028:
029:            public byte[] engineDigest() {
030:                byte[] digestBytes = new byte[digest.getDigestSize()];
031:
032:                digest.doFinal(digestBytes, 0);
033:
034:                return digestBytes;
035:            }
036:
037:            /**
038:             * classes that extend directly off us.
039:             */
040:            static public class SHA1 extends JDKMessageDigest implements 
041:                    Cloneable {
042:                public SHA1() {
043:                    super (new SHA1Digest());
044:                }
045:
046:                public Object clone() throws CloneNotSupportedException {
047:                    SHA1 d = (SHA1) super .clone();
048:                    d.digest = new SHA1Digest((SHA1Digest) digest);
049:
050:                    return d;
051:                }
052:            }
053:
054:            static public class SHA224 extends JDKMessageDigest implements 
055:                    Cloneable {
056:                public SHA224() {
057:                    super (new SHA224Digest());
058:                }
059:
060:                public Object clone() throws CloneNotSupportedException {
061:                    SHA224 d = (SHA224) super .clone();
062:                    d.digest = new SHA224Digest((SHA224Digest) digest);
063:
064:                    return d;
065:                }
066:            }
067:
068:            static public class SHA256 extends JDKMessageDigest implements 
069:                    Cloneable {
070:                public SHA256() {
071:                    super (new SHA256Digest());
072:                }
073:
074:                public Object clone() throws CloneNotSupportedException {
075:                    SHA256 d = (SHA256) super .clone();
076:                    d.digest = new SHA256Digest((SHA256Digest) digest);
077:
078:                    return d;
079:                }
080:            }
081:
082:            static public class SHA384 extends JDKMessageDigest implements 
083:                    Cloneable {
084:                public SHA384() {
085:                    super (new SHA384Digest());
086:                }
087:
088:                public Object clone() throws CloneNotSupportedException {
089:                    SHA384 d = (SHA384) super .clone();
090:                    d.digest = new SHA384Digest((SHA384Digest) digest);
091:
092:                    return d;
093:                }
094:            }
095:
096:            static public class SHA512 extends JDKMessageDigest implements 
097:                    Cloneable {
098:                public SHA512() {
099:                    super (new SHA512Digest());
100:                }
101:
102:                public Object clone() throws CloneNotSupportedException {
103:                    SHA512 d = (SHA512) super .clone();
104:                    d.digest = new SHA512Digest((SHA512Digest) digest);
105:
106:                    return d;
107:                }
108:            }
109:
110:            static public class MD2 extends JDKMessageDigest implements 
111:                    Cloneable {
112:                public MD2() {
113:                    super (new MD2Digest());
114:                }
115:
116:                public Object clone() throws CloneNotSupportedException {
117:                    MD2 d = (MD2) super .clone();
118:                    d.digest = new MD2Digest((MD2Digest) digest);
119:
120:                    return d;
121:                }
122:            }
123:
124:            static public class MD4 extends JDKMessageDigest implements 
125:                    Cloneable {
126:                public MD4() {
127:                    super (new MD4Digest());
128:                }
129:
130:                public Object clone() throws CloneNotSupportedException {
131:                    MD4 d = (MD4) super .clone();
132:                    d.digest = new MD4Digest((MD4Digest) digest);
133:
134:                    return d;
135:                }
136:            }
137:
138:            static public class MD5 extends JDKMessageDigest implements 
139:                    Cloneable {
140:                public MD5() {
141:                    super (new MD5Digest());
142:                }
143:
144:                public Object clone() throws CloneNotSupportedException {
145:                    MD5 d = (MD5) super .clone();
146:                    d.digest = new MD5Digest((MD5Digest) digest);
147:
148:                    return d;
149:                }
150:            }
151:
152:            static public class RIPEMD128 extends JDKMessageDigest implements 
153:                    Cloneable {
154:                public RIPEMD128() {
155:                    super (new RIPEMD128Digest());
156:                }
157:
158:                public Object clone() throws CloneNotSupportedException {
159:                    RIPEMD128 d = (RIPEMD128) super .clone();
160:                    d.digest = new RIPEMD128Digest((RIPEMD128Digest) digest);
161:
162:                    return d;
163:                }
164:            }
165:
166:            static public class RIPEMD160 extends JDKMessageDigest implements 
167:                    Cloneable {
168:                public RIPEMD160() {
169:                    super (new RIPEMD160Digest());
170:                }
171:
172:                public Object clone() throws CloneNotSupportedException {
173:                    RIPEMD160 d = (RIPEMD160) super .clone();
174:                    d.digest = new RIPEMD160Digest((RIPEMD160Digest) digest);
175:
176:                    return d;
177:                }
178:            }
179:
180:            static public class RIPEMD256 extends JDKMessageDigest implements 
181:                    Cloneable {
182:                public RIPEMD256() {
183:                    super (new RIPEMD256Digest());
184:                }
185:
186:                public Object clone() throws CloneNotSupportedException {
187:                    RIPEMD256 d = (RIPEMD256) super .clone();
188:                    d.digest = new RIPEMD256Digest((RIPEMD256Digest) digest);
189:
190:                    return d;
191:                }
192:            }
193:
194:            static public class RIPEMD320 extends JDKMessageDigest implements 
195:                    Cloneable {
196:                public RIPEMD320() {
197:                    super (new RIPEMD320Digest());
198:                }
199:
200:                public Object clone() throws CloneNotSupportedException {
201:                    RIPEMD320 d = (RIPEMD320) super .clone();
202:                    d.digest = new RIPEMD320Digest((RIPEMD320Digest) digest);
203:
204:                    return d;
205:                }
206:            }
207:
208:            static public class Tiger extends JDKMessageDigest implements 
209:                    Cloneable {
210:                public Tiger() {
211:                    super (new TigerDigest());
212:                }
213:
214:                public Object clone() throws CloneNotSupportedException {
215:                    Tiger d = (Tiger) super .clone();
216:                    d.digest = new TigerDigest((TigerDigest) digest);
217:
218:                    return d;
219:                }
220:            }
221:
222:            static public class GOST3411 extends JDKMessageDigest implements 
223:                    Cloneable {
224:                public GOST3411() {
225:                    super (new GOST3411Digest());
226:                }
227:
228:                public Object clone() throws CloneNotSupportedException {
229:                    GOST3411 d = (GOST3411) super .clone();
230:                    d.digest = new GOST3411Digest((GOST3411Digest) digest);
231:
232:                    return d;
233:                }
234:            }
235:
236:            static public class Whirlpool extends JDKMessageDigest implements 
237:                    Cloneable {
238:                public Whirlpool() {
239:                    super (new WhirlpoolDigest());
240:                }
241:
242:                public Object clone() throws CloneNotSupportedException {
243:                    Whirlpool d = (Whirlpool) super .clone();
244:                    d.digest = new WhirlpoolDigest((WhirlpoolDigest) digest);
245:
246:                    return d;
247:                }
248:            }
249:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.