org.productivity.java.habitat4j.crypto.decryptor.generic
Class GenericCrypto

java.lang.Object
  extended by org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
      extended by org.productivity.java.habitat4j.crypto.decryptor.generic.GenericCrypto
Direct Known Subclasses:
GenericKeyProtector, GenericPropertyDecryptor, IntegrityGenericCrypto, PropertyCryptTool, SimpleGenericDecryptor

public abstract class GenericCrypto
extends StaticCrypto


Field Summary
protected  GenericCryptoConfig config
           
protected  KeyInfoIF keyInfo
           
 
Constructor Summary
GenericCrypto()
           
 
Method Summary
protected  byte[] createHash(java.lang.String value, java.lang.String hashAlgorithm)
           
protected  java.lang.String createString(byte[] in)
           
protected  java.lang.String decrypt(byte[] value)
           
protected  byte[] getBytes(java.lang.String in)
           
protected  KeyReader getKeyReader()
           
protected  void initialize(GenericCryptoConfig config)
           
protected static byte[] xcrypt(int mode, KeyInfoIF keyInfo, byte[] in, java.lang.String keyAlgorithm, java.lang.String cipherAlgorithm, boolean pad)
           
 
Methods inherited from class org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
createString, decode, encode, findPadEndIndex, getBytes, pad, removePad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected GenericCryptoConfig config

keyInfo

protected KeyInfoIF keyInfo
Constructor Detail

GenericCrypto

public GenericCrypto()
Method Detail

initialize

protected void initialize(GenericCryptoConfig config)
                   throws DecryptorException
Throws:
DecryptorException

getBytes

protected byte[] getBytes(java.lang.String in)
                   throws DecryptorException
Throws:
DecryptorException

createString

protected java.lang.String createString(byte[] in)
                                 throws DecryptorException
Throws:
DecryptorException

xcrypt

protected static byte[] xcrypt(int mode,
                               KeyInfoIF keyInfo,
                               byte[] in,
                               java.lang.String keyAlgorithm,
                               java.lang.String cipherAlgorithm,
                               boolean pad)
                        throws DecryptorException
Throws:
DecryptorException

decrypt

protected java.lang.String decrypt(byte[] value)
                            throws DecryptorException
Throws:
DecryptorException

getKeyReader

protected KeyReader getKeyReader()
                          throws DecryptorException
Throws:
DecryptorException

createHash

protected byte[] createHash(java.lang.String value,
                            java.lang.String hashAlgorithm)
                     throws DecryptorException
Throws:
DecryptorException