|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.crypto.Cipher
tribble.crypto.Cipher
Cryptographic cipher implementation.
This class generates instances of cryptographic cipher algorithms.
Cipher objects (of type javax.crypto.Cipher) are constructed from a
combination of a cipher SPI object, which is one of generic cipher algorithm
types derived from this class, CipherSpi, and a primitive cipher
algorithm, which is a class derived from class AbstractCipher.
Copyright ©2005 by David R. Tribble, all rights reserved.
Permission is granted to freely use and distribute this source code
provided that the original copyright and authorship notices remain
intact.
CipherSpi,
AbstractCipher,
MyProvider| Field Summary | |
static short |
DECRYPT_MODE
Initialization mode: Decryption. |
static short |
ENCRYPT_MODE
Initialization mode: Encryption. |
static java.lang.String |
MODE_BC
Operating mode (block): BC, block chaining. |
static java.lang.String |
MODE_CBC
Operating mode (block): CBC, cipher block chaining. |
static java.lang.String |
MODE_CFB
Operating mode (stream): CFB, cipher feedback. |
static java.lang.String |
MODE_CFB8
Operating mode (stream): CFB-8, cipher feedback. |
static java.lang.String |
MODE_CTR
Operating mode (stream): CTR, counter mode. |
static java.lang.String |
MODE_CTR8
Operating mode (stream): CTR-8, counter mode. |
static java.lang.String |
MODE_ECB
Operating mode (block): ECB, electronic codebook (no chaining). |
static java.lang.String |
MODE_OFB
Operating mode (stream): OFB, output feedback. |
static java.lang.String |
MODE_OFB8
Operating mode (stream): OFB-8, output feedback. |
static java.lang.String |
MODE_PBC
Operating mode (block): PBC, plaintext block chaining. |
static java.lang.String |
MODE_PCBC
Operating mode (block): PCBC, propagating cipher block chaining. |
static java.lang.String |
MODE_PFB
Operating mode (stream): PFB, plaintext feedback. |
static java.lang.String |
MODE_PFB8
Operating mode (stream): PFB-8, plaintext feedback. |
static java.lang.String |
PADDING_CTS
Padding scheme: Ciphertext stealing in the final partial block. |
static java.lang.String |
PADDING_NONE
Padding scheme: None. |
static java.lang.String |
PADDING_PKCS5
Padding scheme: PKCS#5. |
static java.lang.String |
PADDING_ZEROS
Padding scheme: Pad with zero bytes (nulls). |
static short |
PRIVATE_KEY
Key type: Private. |
static short |
PUBLIC_KEY
Key type: Public. |
static short |
SECRET_KEY
Key type: Secret. |
static int |
SERIES
Class series version. |
static short |
UNWRAP_MODE
Key wrap mode: Unwrap. |
static short |
WRAP_MODE
Key wrap mode: Wrap. |
| Method Summary | |
void |
clear()
Clear (wipe) this cipher. |
protected void |
finalize()
Finalization. |
static Cipher |
getCipher(java.lang.String trans)
Generates a Cipher object that implements the specified
transformation. |
| Methods inherited from class javax.crypto.Cipher |
doFinal, doFinal, doFinal, doFinal, doFinal, doFinal, getAlgorithm, getBlockSize, getExemptionMechanism, getInstance, getInstance, getInstance, getIV, getOutputSize, getParameters, getProvider, init, init, init, init, init, init, init, init, unwrap, update, update, update, update, wrap |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SERIES
public static final short ENCRYPT_MODE
public static final short DECRYPT_MODE
public static final short SECRET_KEY
public static final short PUBLIC_KEY
public static final short PRIVATE_KEY
public static final short WRAP_MODE
public static final short UNWRAP_MODE
public static final java.lang.String MODE_ECB
public static final java.lang.String MODE_CBC
public static final java.lang.String MODE_PBC
public static final java.lang.String MODE_PCBC
public static final java.lang.String MODE_BC
public static final java.lang.String MODE_CFB
public static final java.lang.String MODE_CFB8
public static final java.lang.String MODE_OFB
public static final java.lang.String MODE_OFB8
public static final java.lang.String MODE_PFB
public static final java.lang.String MODE_PFB8
public static final java.lang.String MODE_CTR
public static final java.lang.String MODE_CTR8
public static final java.lang.String PADDING_NONE
public static final java.lang.String PADDING_PKCS5
public static final java.lang.String PADDING_ZEROS
public static final java.lang.String PADDING_CTS
| Method Detail |
public static final Cipher getCipher(java.lang.String trans)
throws java.security.NoSuchAlgorithmException,
javax.crypto.NoSuchPaddingException
Cipher object that implements the specified
transformation.
This method corresponds to the getInstance() method of class javax.crypto.Cipher.
trans - The name of the transformation, e.g., "AES/CBC/PKCS5Padding".
java.security.NoSuchAlgorithmException - Thrown if trans does not specify a transformation provided by
this implementation package.
javax.crypto.NoSuchPaddingException - Thrown if trans does not specify a padding scheme provided by
this implementation package.public void clear()
This method is not part of the standard set defined in class javax.crypto.Cipher, but is provided as a convenient enhancement.
Note that this cipher object is no longer usable after calling this method.
protected void finalize()
throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||