|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A CipherProvider is a wrapper for a Cipher class in JCE. This service is only available when run on JDK1.2 or beyond. To use this service, either the SunJCE or an alternative clean room implementation of the JCE must be installed. To use a CipherProvider to encrypt or decrypt, it needs 3 things: 1) A CipherProvider that is initialized to ENCRYPT or DECRYPT 2) A secret Key for the encryption/decryption 3) An Initialization Vector (IvParameterSpec) that is used to create some randomness in the encryption See $WS/docs/funcspec/mulan/configurableEncryption.html See http://java.sun.com/products/JDK/1.1/docs/guide/security/CryptoSpec.html See http://java.sun.com/products/JDK/1.2/docs/guide/security/CryptoSpec.html See http://java.sun.com/products/jdk/1.2/jce/index.html
Method Summary | |
int |
decrypt(byte[] ciphertext,
int offset,
int length,
byte[] cleartext,
int outputOffset)
Decrypt data - use only with Cipher that has been initialized with CipherFactory.DECRYPT. |
int |
encrypt(byte[] cleartext,
int offset,
int length,
byte[] ciphertext,
int outputOffset)
Encrypt data - use only with Cipher that has been initialized with CipherFactory.ENCRYPT. |
int |
getEncryptionBlockSize()
Returns the encryption block size used during creation of the encrypted database |
Method Detail |
public int encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset) throws StandardException
cleartext
- the byte array containing the cleartextoffset
- encrypt from this byte offset in the cleartextlength
- encrypt this many bytes starting from offsetciphertext
- the byte array to store the ciphertextoutputOffset
- the offset into the ciphertext array the output
should go
If cleartext and ciphertext are the same array, caller must be careful
to not overwrite the cleartext before it is scrambled.
StandardException
- Standard Cloudscape Error Policypublic int decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset) throws StandardException
ciphertext
- the byte array containing the ciphertextoffset
- decrypt from this byte offset in the ciphertextlength
- decrypt this many bytes starting from offsetcleartext
- the byte array to store the cleartextoutputOffset
- the offset into the cleartext array the output
should go
If cleartext and ciphertext are the same array, caller must be careful
to not overwrite the ciphertext before it is un-scrambled.
StandardException
- Standard Cloudscape Error Policypublic int getEncryptionBlockSize()
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |