com.ibm.di.api.security
Class CryptoUtils

java.lang.Object
  extended by com.ibm.di.api.security.CryptoUtils

public class CryptoUtils
extends Object


Field Summary
static String MODE_CDECRYPT
           
static String MODE_CENCRYPT
           
static String MODE_DECRYPT
           
static String MODE_ENCRYPT
           
 
Constructor Summary
CryptoUtils()
           
 
Method Summary
static byte[] decrypt(byte[] aData, String aKeyStore, String aKeyStorePass, String aCertAlias, String aKeyPassword)
           
static byte[] decryptSecurityRegistry(byte[] aData)
           
static byte[] decryptWithServerKey(byte[] aData)
           
static byte[] dencryptWithServerKey(byte[] aData)
          Deprecated. Use decryptWithServerKey (byte[] aData)
static byte[] encrypt(byte[] aData, String aKeyStore, String aKeyStorePass, String aCertAlias)
           
static byte[] encryptWithServerKey(byte[] aData)
           
static void main(String[] args)
           
static byte[] readFile(String aFileName)
           
static void setKeyStorePasswords(String aKeyStorePassword, String aKeyPassword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_ENCRYPT

public static final String MODE_ENCRYPT
See Also:
Constant Field Values

MODE_DECRYPT

public static final String MODE_DECRYPT
See Also:
Constant Field Values

MODE_CENCRYPT

public static final String MODE_CENCRYPT
See Also:
Constant Field Values

MODE_CDECRYPT

public static final String MODE_CDECRYPT
See Also:
Constant Field Values
Constructor Detail

CryptoUtils

public CryptoUtils()
Method Detail

setKeyStorePasswords

public static void setKeyStorePasswords(String aKeyStorePassword,
                                        String aKeyPassword)
                                 throws Exception
Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

readFile

public static byte[] readFile(String aFileName)
                       throws IOException
Throws:
IOException

encrypt

public static byte[] encrypt(byte[] aData,
                             String aKeyStore,
                             String aKeyStorePass,
                             String aCertAlias)
                      throws Exception
Throws:
Exception

decryptSecurityRegistry

public static byte[] decryptSecurityRegistry(byte[] aData)
                                      throws Exception
Throws:
Exception

decrypt

public static byte[] decrypt(byte[] aData,
                             String aKeyStore,
                             String aKeyStorePass,
                             String aCertAlias,
                             String aKeyPassword)
                      throws Exception
Throws:
Exception

encryptWithServerKey

public static byte[] encryptWithServerKey(byte[] aData)
                                   throws Exception
Throws:
Exception

dencryptWithServerKey

public static byte[] dencryptWithServerKey(byte[] aData)
                                    throws Exception
Deprecated. Use decryptWithServerKey (byte[] aData)

Throws:
Exception

decryptWithServerKey

public static byte[] decryptWithServerKey(byte[] aData)
                                   throws Exception
Throws:
Exception