|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.api.security.CryptoUtils
public class CryptoUtils
This class represents the Server's cryptographic module. It is initialized by the Server at startup.
| Field Summary | |
|---|---|
static String |
ENCRYPTION_PROP_SERVER_KEY_ALIAS
System property that specifies the alias of the Server encryption key. |
static String |
ENCRYPTION_PROP_SERVER_KEYSTORE
System property that specifies the path to the keystore which hosts the Server encryption key. |
static String |
ENCRYPTION_PROP_SERVER_KEYSTORE_TYPE
System property that specifies the type of the keystore which hosts the Server encryption key. |
static String |
ENCRYPTION_PROP_SERVER_TRANSFORMATION
System property that specifies the cryptographic transformation used by the Server for encryption. |
static String |
MODE_CDECRYPT
Decrypt a TDI configuration file. |
static String |
MODE_CENCRYPT
Encrypt a TDI configuration file. |
static String |
MODE_DECRYPT
Decrypt User Registry. |
static String |
MODE_ENCRYPT
Encrypt User Registry. |
static String |
MODE_PDECRYPT
Decrypt a TDI properties file. |
static String |
MODE_PENCRYPT
Encrypt a TDI properties file. |
| Constructor Summary | |
|---|---|
CryptoUtils()
|
|
| Method Summary | |
|---|---|
static byte[] |
decryptSecurityRegistry(byte[] data)
Decrypt User Registry contents with the Server encryption key. |
static byte[] |
decryptWithServerKey(byte[] data)
Decrypt data with the Server encryption key. |
static byte[] |
encryptWithServerKey(byte[] data)
Encrypt data with the Server encryption key. |
static Crypto |
getCrypto(String keyAlias,
String transformation)
Create a Crypto object using a specified Certificate. |
static Crypto |
getDefaultCrypto()
Retrieve an object representation of the Server's encryption/decryption functionality. |
static String[] |
getKeyStoreAliases()
Returns a list of the server Certificate aliases. |
static void |
init(String keyStorePass,
String keyPass)
Initialize this module. |
static void |
main(String[] args)
The entry-point of the cryptoutils command-line tool. |
static byte[] |
readFile(String fileName)
Read a whole file as binary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MODE_ENCRYPT
public static final String MODE_DECRYPT
public static final String MODE_CENCRYPT
public static final String MODE_CDECRYPT
public static final String MODE_PENCRYPT
public static final String MODE_PDECRYPT
public static final String ENCRYPTION_PROP_SERVER_KEYSTORE
public static final String ENCRYPTION_PROP_SERVER_KEYSTORE_TYPE
public static final String ENCRYPTION_PROP_SERVER_TRANSFORMATION
javax.crypto.Cipher.getInstance would accept. For example
"AES/CBC/PKCS5Padding". The transformation must explicitly require a
secret key. Password-based (PBE) transformations are not supported.
public static final String ENCRYPTION_PROP_SERVER_KEY_ALIAS
| Constructor Detail |
|---|
public CryptoUtils()
| Method Detail |
|---|
public static void init(String keyStorePass,
String keyPass)
throws Exception
keyStorePass - a password for the keystore that hosts the Server encryption
keykeyPass - a password for the key inside the keystore
Exception - the module is already initialized; a required system property
is missing; the key cannot be retrieved; the encryption
transformation is not supported; the key is not suitable for
the encryption transformation
public static void main(String[] args)
throws Exception
args - command-line arguments
Exception - operation error
public static byte[] readFile(String fileName)
throws IOException
fileName - file to read
IOException - error while reading the file
public static byte[] decryptSecurityRegistry(byte[] data)
throws Exception
data - User Registry contents
Exception - this module is not initialized or some cryptographic error
occurred
public static byte[] encryptWithServerKey(byte[] data)
throws Exception
data - data to encrypt
Exception - this module is not initialized or some cryptographic error
occurred
public static byte[] decryptWithServerKey(byte[] data)
throws Exception
data - encrypted data
Exception - this module is not initialized or some cryptographic error
occurred
public static Crypto getDefaultCrypto()
throws Exception
Exception - this module is not initialized
public static Crypto getCrypto(String keyAlias,
String transformation)
throws Exception
keyAlias - The alias for the Certificatetransformation - The Crypto algorithm/transformation to use
Exception - this module is not initialized
public static String[] getKeyStoreAliases()
throws Exception
Exception - if this module is not initialized
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||