| org.apache.derby.iapi.services.crypto.CipherFactory
All known Subclasses: org.apache.derby.impl.services.jce.JCECipherFactory,
CipherFactory | public interface CipherFactory (Code) | | A CipherFactory can create new CipherProvider, which is a wrapper for a
javax.crypto.Cipher
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
|
Field Summary | |
final public static int | DECRYPT | final public static int | ENCRYPT Get a CipherProvider that either Encrypts or Decrypts. | final public static int | MIN_BOOTPASS_LENGTH |
DECRYPT | final public static int DECRYPT(Code) | | |
ENCRYPT | final public static int ENCRYPT(Code) | | Get a CipherProvider that either Encrypts or Decrypts.
|
MIN_BOOTPASS_LENGTH | final public static int MIN_BOOTPASS_LENGTH(Code) | | Minimum bootPassword length
|
createNewCipher | CipherProvider createNewCipher(int mode) throws StandardException(Code) | | Returns a CipherProvider which is the encryption or decryption engine.
Parameters: mode - is either ENCRYPT or DECRYPT. The CipherProvider can onlydo encryption or decryption but not both. exception: StandardException - Standard Cloudscape Error Policy |
verifyKey | public void verifyKey(boolean create, StorageFactory storageFactory, Properties properties) throws StandardException(Code) | | Verify the external encryption key. Throws exception if unable to verify
that the encryption key is the same as that
used during database creation or if there are any problems when trying to do the
verification process.
Parameters: create - true means database is being created, whereas falseimplies that the database has already been created Parameters: storageFactory - storageFactory is used to access any stored datathat might be needed for verification process of the encryption key Parameters: properties - properties at time of database connection as well as those in service.properties |
|
|