com.ibm.di.security
Class SecurityCrypto
java.lang.Object
com.ibm.di.security.SecurityCrypto
public class SecurityCrypto
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecurityCrypto
public SecurityCrypto(String keyPath)
throws Exception
- Throws:
Exception
SecurityCrypto
public SecurityCrypto(String keyPath,
String cipherAlg)
throws Exception
- Throws:
Exception
SecurityCrypto
public SecurityCrypto(String keyPath,
String cipherAlg,
Provider provider)
throws Exception
- Creates SecurityCrypto Object with the provided parameters. The object
contains the key, cipher and algorithm used.
- Parameters:
keyPath
- this parameter contains the secret key.cipherAlg
- this is the cipher algorithm which will be used to create the
cipher. If this parameter is null then the value of the
property "com.ibm.di.securityTransformation" will be used. If
the property has no value then a default value for the
algorithm will be used - DES/ECB/NoPadding.provider
- this is the security provider which will be used to create the
cipher. If the parameter is null then the
"com.ibm.di.cryptoProviderName" property will be checked for
the name of an already registered security provider and if not
found then the cipher will be created without an explicit
security provider.
- Throws:
Exception
- if an error occurs.
getDecrypted
public String getDecrypted(String input)
throws Exception
- Throws:
Exception
getEncrypted
public String getEncrypted(byte[] input)
throws Exception
- Throws:
Exception
encrypt
public byte[] encrypt(byte[] input)
throws Exception
- Throws:
Exception
decrypt
public byte[] decrypt(byte[] input)
throws Exception
- Throws:
Exception