org.productivity.java.habitat4j.crypto.decryptor.keyreader
Class KeyReader

java.lang.Object
  extended by org.productivity.java.habitat4j.crypto.decryptor.StaticCrypto
      extended by org.productivity.java.habitat4j.crypto.decryptor.keyreader.KeyReader
Direct Known Subclasses:
ClasspathKeyReader, FileKeyReader, ServerIdentityKeyReader

public abstract class KeyReader
extends StaticCrypto


Field Summary
protected static java.util.Map aliasMap
           
protected  CryptoConfig config
           
protected static java.lang.String[] DEFAULT_KEYREADER_ALIASES
           
protected static java.lang.String KEY_PROTECTOR_CLASS
           
protected static java.util.Map KEYREADER_ALIAS_MAP
           
 
Constructor Summary
KeyReader()
           
 
Method Summary
static void addKeyReaderAlias(java.lang.String alias, java.lang.Class clazz)
           
protected static KeyProtectorIF createKeyProtector(java.lang.String className)
           
static KeyReader createKeyReader(CryptoConfig config)
           
 void initialize(CryptoConfig config)
           
protected static java.lang.String lookupAlias(java.lang.String alias)
           
 KeyInfoIF readKey()
           
abstract  java.io.Serializable readProtectedKey()
           
static void setKeyProtector(java.lang.String clazz)
           
 
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

KEY_PROTECTOR_CLASS

protected static java.lang.String KEY_PROTECTOR_CLASS

DEFAULT_KEYREADER_ALIASES

protected static final java.lang.String[] DEFAULT_KEYREADER_ALIASES

KEYREADER_ALIAS_MAP

protected static java.util.Map KEYREADER_ALIAS_MAP

config

protected CryptoConfig config

aliasMap

protected static java.util.Map aliasMap
Constructor Detail

KeyReader

public KeyReader()
Method Detail

initialize

public void initialize(CryptoConfig config)

readProtectedKey

public abstract java.io.Serializable readProtectedKey()
                                               throws DecryptorException
Throws:
DecryptorException

readKey

public KeyInfoIF readKey()
                  throws DecryptorException
Throws:
DecryptorException

lookupAlias

protected static java.lang.String lookupAlias(java.lang.String alias)

createKeyProtector

protected static KeyProtectorIF createKeyProtector(java.lang.String className)
                                            throws DecryptorException
Throws:
DecryptorException

createKeyReader

public static KeyReader createKeyReader(CryptoConfig config)
                                 throws DecryptorException
Throws:
DecryptorException

setKeyProtector

public static void setKeyProtector(java.lang.String clazz)
                            throws DecryptorException
Throws:
DecryptorException

addKeyReaderAlias

public static void addKeyReaderAlias(java.lang.String alias,
                                     java.lang.Class clazz)
                              throws DecryptorException
Throws:
DecryptorException