public abstract class AbstractPrivateKeyObfuscator extends Object implements PrivateKeyObfuscator
Modifier | Constructor and Description |
---|---|
protected |
AbstractPrivateKeyObfuscator(String name) |
Modifier and Type | Method and Description |
---|---|
<A extends 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) |
byte[] |
generateInitializationVector(PrivateKeyEncryptionContext encContext) |
String |
getCipherName() |
protected abstract int |
resolveInitializationVectorLength(PrivateKeyEncryptionContext encContext) |
protected abstract int |
resolveKeyLength(PrivateKeyEncryptionContext encContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyPrivateKeyCipher, getSupportedKeySizes
protected AbstractPrivateKeyObfuscator(String name)
public final String getCipherName()
getCipherName
in interface PrivateKeyObfuscator
public byte[] generateInitializationVector(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
generateInitializationVector
in interface PrivateKeyObfuscator
encContext
- The encryption contextGeneralSecurityException
public <A extends Appendable> A appendPrivateKeyEncryptionContext(A sb, PrivateKeyEncryptionContext encContext) throws IOException
appendPrivateKeyEncryptionContext
in interface PrivateKeyObfuscator
A
- Appendable generic typesb
- The Appendable
instance to updateIOException
protected abstract int resolveInitializationVectorLength(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
GeneralSecurityException
protected abstract int resolveKeyLength(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
GeneralSecurityException
protected byte[] deriveEncryptionKey(PrivateKeyEncryptionContext encContext, int outputKeyLength) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
protected byte[] applyPrivateKeyCipher(byte[] bytes, PrivateKeyEncryptionContext encContext, int numBits, byte[] keyValue, boolean encryptIt) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.