public abstract class AbstractPrivateKeyObfuscator extends java.lang.Object implements PrivateKeyObfuscator
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
algName |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPrivateKeyObfuscator(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
<A extends java.lang.Appendable> |
appendPrivateKeyEncryptionContext(A sb,
PrivateKeyEncryptionContext encContext) |
protected byte[] |
applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
int numBits,
byte[] keyValue,
boolean encryptIt) |
protected byte[] |
deriveEncryptionKey(PrivateKeyEncryptionContext encContext,
int outputKeyLength) |
protected byte[] |
generateInitializationVector(int keyLength) |
byte[] |
generateInitializationVector(PrivateKeyEncryptionContext encContext) |
java.lang.String |
getCipherName() |
protected abstract int |
resolveKeyLength(PrivateKeyEncryptionContext encContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyPrivateKeyCipher, getSupportedKeySizes
protected AbstractPrivateKeyObfuscator(java.lang.String name)
public final java.lang.String getCipherName()
getCipherName
in interface PrivateKeyObfuscator
public byte[] generateInitializationVector(PrivateKeyEncryptionContext encContext) throws java.security.GeneralSecurityException
generateInitializationVector
in interface PrivateKeyObfuscator
encContext
- The encryption contextjava.security.GeneralSecurityException
public <A extends java.lang.Appendable> A appendPrivateKeyEncryptionContext(A sb, PrivateKeyEncryptionContext encContext) throws java.io.IOException
appendPrivateKeyEncryptionContext
in interface PrivateKeyObfuscator
A
- Appendable generic typesb
- The Appendable
instance to updatejava.io.IOException
protected byte[] generateInitializationVector(int keyLength)
protected abstract int resolveKeyLength(PrivateKeyEncryptionContext encContext) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected byte[] deriveEncryptionKey(PrivateKeyEncryptionContext encContext, int outputKeyLength) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
protected byte[] applyPrivateKeyCipher(byte[] bytes, PrivateKeyEncryptionContext encContext, int numBits, byte[] keyValue, boolean encryptIt) throws java.io.IOException, java.security.GeneralSecurityException
java.io.IOException
java.security.GeneralSecurityException