|
HDIV API 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hdiv.cipher.CipherHTTP
public class CipherHTTP
The principal class related with cryptography. It has the responsability to encrypt and decrypt data.
Cipher,
IvParameterSpec,
Serialized Form| Constructor Summary | |
|---|---|
CipherHTTP()
|
|
| Method Summary | |
|---|---|
byte[] |
decrypt(byte[] data)
Decrypts data in a single-part operation, or finishes a
multiple-part operation. |
byte[] |
encrypt(byte[] data)
Encrypts data in a single-part operation, or finishes a
multiple-part operation. |
void |
init()
Generates a Cipher object that implements the specified transformation. |
void |
initDecryptMode(Key key)
Generates a Cipher object that implements the specified transformation, initializes cipher vector and initializes
cipher to decryption mode with a key and a set of algorithm parameters. |
void |
initEncryptMode(Key key)
Generates a Cipher object that implements the specified transformation, initializes cipher vector and initializes
cipher to encryption mode with a key and a set of algorithm parameters. |
boolean |
isEncryptMode()
|
void |
setEncryptMode(boolean encryptMode)
|
void |
setProvider(java.lang.String provider)
|
void |
setTransformation(java.lang.String transformation)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CipherHTTP()
| Method Detail |
|---|
public void init()
public void initEncryptMode(Key key)
Generates a Cipher object that implements the specified
transformation, initializes cipher vector and initializes
cipher to encryption mode with a key and a set of algorithm parameters.
The name of the transformation, e.g., DES/CBC/PKCS5Padding. See Appendix A in the Java Cryptography Extension Reference Guide for information about standard transformation names.
initEncryptMode in interface ICipherHTTPkey - the encryption key
HDIVException - if there is an initialization error.public void initDecryptMode(Key key)
transformation, initializes cipher vector and initializes
cipher to decryption mode with a key and a set of algorithm parameters.
initDecryptMode in interface ICipherHTTPkey - the encryption key
HDIVException - if there is an initialization error.public byte[] encrypt(byte[] data)
data in a single-part operation, or finishes a
multiple-part operation. The data is encrypted depending on how this cipher
was initialized.
The bytes in the input buffer, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. The result is stored in a new buffer.
if any exception is thrown, this cipher object may need to be reset before it can be used again.
encrypt in interface ICipherHTTPdata - The input buffer to encrypt
HDIVException - if any exception is thrown in encryption process.public byte[] decrypt(byte[] data)
data in a single-part operation, or finishes a
multiple-part operation. The data is decrypted depending on how this cipher
was initialized.
The bytes in the input buffer, and any input bytes that may have been buffered during a previous update operation, are processed, with padding (if requested) being applied. The result is stored in a new buffer.
if any exception is thrown, this cipher object may need to be reset before it can be used again.
decrypt in interface ICipherHTTPdata - The input buffer to decrypt
HDIVException - if any exception is thrown in decryption process.public void setTransformation(java.lang.String transformation)
transformation - The transformation to set for the cipher factory bean.public void setProvider(java.lang.String provider)
provider - The provider to set.public boolean isEncryptMode()
public void setEncryptMode(boolean encryptMode)
|
HDIV 2.0.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||