| org.apache.derby.iapi.services.crypto.CipherProvider
All known Subclasses: org.apache.derby.impl.services.jce.JCECipherProvider,
CipherProvider | public interface CipherProvider (Code) | | 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. | public int | getEncryptionBlockSize() |
decrypt | int decrypt(byte[] ciphertext, int offset, int length, byte[] cleartext, int outputOffset) throws StandardException(Code) | | Decrypt data - use only with Cipher that has been initialized with
CipherFactory.DECRYPT.
The number of bytes stored in cleartext. Parameters: ciphertext - the byte array containing the ciphertext Parameters: offset - decrypt from this byte offset in the ciphertext Parameters: length - decrypt this many bytes starting from offset Parameters: cleartext - the byte array to store the cleartext Parameters: outputOffset - the offset into the cleartext array the outputshould goIf cleartext and ciphertext are the same array, caller must be carefulto not overwrite the ciphertext before it is un-scrambled. exception: StandardException - Standard Cloudscape Error Policy |
encrypt | int encrypt(byte[] cleartext, int offset, int length, byte[] ciphertext, int outputOffset) throws StandardException(Code) | | Encrypt data - use only with Cipher that has been initialized with
CipherFactory.ENCRYPT.
The number of bytes stored in ciphertext. Parameters: cleartext - the byte array containing the cleartext Parameters: offset - encrypt from this byte offset in the cleartext Parameters: length - encrypt this many bytes starting from offset Parameters: ciphertext - the byte array to store the ciphertext Parameters: outputOffset - the offset into the ciphertext array the outputshould goIf cleartext and ciphertext are the same array, caller must be carefulto not overwrite the cleartext before it is scrambled. exception: StandardException - Standard Cloudscape Error Policy |
getEncryptionBlockSize | public int getEncryptionBlockSize()(Code) | | Returns the encryption block size used during creation of the encrypted database
|
|
|