Java Doc for BlockCipher.java in  » Parser » Rats-Parser-Generators » cryptix » jce » provider » cipher » 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 » Parser » Rats Parser Generators » cryptix.jce.provider.cipher 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


cryptix.jce.provider.cipher.BlockCipher

All known Subclasses:   cryptix.jce.provider.cipher.Twofish,  cryptix.jce.provider.cipher.MARS,  cryptix.jce.provider.cipher.Blowfish,  cryptix.jce.provider.cipher.Serpent,  cryptix.jce.provider.cipher.Rijndael,  cryptix.jce.provider.cipher.CAST5,
BlockCipher
abstract public class BlockCipher extends CipherSpi (Code)

A fully constructed Cipher instance looks like this:

 +------------------------------------------+
 | CipherSpi (API methods)                  |
 |                                          |
 | +--------------------------------------+ |
 | | Padding                              | |
 | |                                      | |
 | | +----------------------------------+ | |
 | | | Mode                             | | |
 | | |                                  | | |
 | | | +------------------------------+ | | |
 | | | | CipherSpi                    | | | |
 | | | | (blockcipher implementation) | | | |
 | | | |                              | | | |
 | | | +------------------------------+ | | |
 | | |                                  | | |
 | | +----------------------------------+ | |
 | |                                      | |
 | +--------------------------------------+ |
 |                                          |
 +------------------------------------------+
 

author:
   Jeroen C. van Gelderen (gelderen@cryptix.org)
author:
   Paul Waserbrot (pw@cryptix.org)
version:
   $Revision: 1.1 $



Constructor Summary
protected  BlockCipher(int blockSize)
     Construct a new BlockCipher (CipherSpi) with an zero-length name "" and given block size.
protected  BlockCipher(String algorithm, int blockSize)
     Construct a new BlockCipher (CipherSpi) with the given name and block size.

Method Summary
final public  Objectclone()
     Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons).
abstract  voidcoreCrypt(byte[] in, int inOffset, byte[] out, int outOffset)
     Encrypt a given buffer.
 intcoreGetBlockSize()
    
abstract  voidcoreInit(Key key, boolean decrypt)
    
final protected  intengineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
    
final protected  byte[]engineDoFinal(byte[] input, int inputOffset, int inputLen)
    
final protected  intengineGetBlockSize()
    
final protected  byte[]engineGetIV()
     Returns a copy of the initialization vector (IV) used in this cipher.
protected  intengineGetKeySize(Key key)
    
final protected  intengineGetOutputSize(int inputLen)
     Returns the length in bytes that an output buffer would need to be in order to hold the result of the next update or doFinal operation, given the input length inputLen (in bytes). This call takes into account any unprocessed (buffered) data from a previous update call(s), and padding. The actual output length of the next update or doFinal call may be smaller than the length returned by this method.
final protected  AlgorithmParametersengineGetParameters()
    
final protected  voidengineInit(int opmode, Key key, SecureRandom random)
     Initialize this blockcipher for encryption or decryption.
final protected  voidengineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
    
final protected  voidengineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
    
final protected  voidengineSetMode(String mode)
    
final protected  voidengineSetPadding(String padding)
    
final protected  intengineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
    
final protected  byte[]engineUpdate(byte[] input, int inputOffset, int inputLen)
    


Constructor Detail
BlockCipher
protected BlockCipher(int blockSize)(Code)
Construct a new BlockCipher (CipherSpi) with an zero-length name "" and given block size.



BlockCipher
protected BlockCipher(String algorithm, int blockSize)(Code)
Construct a new BlockCipher (CipherSpi) with the given name and block size.




Method Detail
clone
final public Object clone() throws CloneNotSupportedException(Code)
Always throws a CloneNotSupportedException (cloning of ciphers is not supported for security reasons).



coreCrypt
abstract void coreCrypt(byte[] in, int inOffset, byte[] out, int outOffset)(Code)
Encrypt a given buffer. in and out can point to the same buffer if (outOffset == inOffset) || (outOffset >= (inOffset+coreGetBlockSize)) That is: the buffers may not partially overlap...



coreGetBlockSize
int coreGetBlockSize()(Code)



coreInit
abstract void coreInit(Key key, boolean decrypt) throws InvalidKeyException(Code)



engineDoFinal
final protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException(Code)

throws:
  BadPaddingException - (decryption only) if padding is expected but not found at theend of the data or the padding is found but corrupt
throws:
  IllegalBlockSizeException - if no padding is specified and the input data is not a multipleof the blocksize.
throws:
  ShortBufferException - if the given buffer is to short to holdthe result.



engineDoFinal
final protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException(Code)
Implemented in terms of engineDoFinal(byte[], int, int, byte[], int)
throws:
  BadPaddingException - (decryption only) if padding is expected but not found at theend of the data.
throws:
  IllegalBlockSizeException - if no padding is specified and the input data is not a multipleof the blocksize.



engineGetBlockSize
final protected int engineGetBlockSize()(Code)



engineGetIV
final protected byte[] engineGetIV()(Code)
Returns a copy of the initialization vector (IV) used in this cipher. A copy of the IV or null if this cipher does not have an IV ornull if the IV has not yet been set.



engineGetKeySize
protected int engineGetKeySize(Key key) throws InvalidKeyException(Code)



engineGetOutputSize
final protected int engineGetOutputSize(int inputLen)(Code)
Returns the length in bytes that an output buffer would need to be in order to hold the result of the next update or doFinal operation, given the input length inputLen (in bytes). This call takes into account any unprocessed (buffered) data from a previous update call(s), and padding. The actual output length of the next update or doFinal call may be smaller than the length returned by this method. For ciphers with a padding, calling the update method will generally return less data than predicted by this function.
Parameters:
  inputLen - the length in bytes. the maximum amount of data that the cipher will return.



engineGetParameters
final protected AlgorithmParameters engineGetParameters()(Code)



engineInit
final protected void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException(Code)
Initialize this blockcipher for encryption or decryption. If the cipher requires randomness, it is taken from random. Randomness is required for modes that use IVs and might be required for some padding schemes.
Parameters:
  opmode - Cipher.ENCRYPT_MODE or Cipher.DECRYPT_MODE.
Parameters:
  key - secret key
Parameters:
  random - source of randomness



engineInit
final protected void engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException(Code)



engineInit
final protected void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException(Code)



engineSetMode
final protected void engineSetMode(String mode) throws NoSuchAlgorithmException(Code)



engineSetPadding
final protected void engineSetPadding(String padding) throws NoSuchPaddingException(Code)



engineUpdate
final protected int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset) throws ShortBufferException(Code)



engineUpdate
final protected byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)(Code)
Implemented in terms of engineUpdate(byte[], int, int, byte[], int)



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.