public class DESPrivateKeyObfuscator extends AbstractPrivateKeyObfuscator
| Modifier and Type | Field and Description |
|---|---|
static java.util.List<java.lang.Integer> |
AVAILABLE_KEY_LENGTHS |
static int |
DEFAULT_KEY_LENGTH |
static DESPrivateKeyObfuscator |
INSTANCE |
| Constructor and Description |
|---|
DESPrivateKeyObfuscator() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt) |
java.util.List<java.lang.Integer> |
getSupportedKeySizes() |
static PrivateKeyEncryptionContext |
resolveEffectiveContext(PrivateKeyEncryptionContext encContext) |
protected int |
resolveInitializationVectorLength(PrivateKeyEncryptionContext encContext) |
protected int |
resolveKeyLength(PrivateKeyEncryptionContext encContext) |
appendPrivateKeyEncryptionContext, applyPrivateKeyCipher, deriveEncryptionKey, generateInitializationVector, getCipherNamepublic static final int DEFAULT_KEY_LENGTH
public static final java.util.List<java.lang.Integer> AVAILABLE_KEY_LENGTHS
public static final DESPrivateKeyObfuscator INSTANCE
public byte[] applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt)
throws java.security.GeneralSecurityException,
java.io.IOException
bytes - Original bytesencContext - The encryption contextencryptIt - If true then encrypt the original bytes, otherwise decrypt themjava.security.GeneralSecurityException - If cannot encrypt/decryptjava.io.IOException - If malformed inputpublic java.util.List<java.lang.Integer> getSupportedKeySizes()
List of the supported key sizes - Note: every call returns a and un-modifiable
instance.protected int resolveKeyLength(PrivateKeyEncryptionContext encContext) throws java.security.GeneralSecurityException
resolveKeyLength in class AbstractPrivateKeyObfuscatorjava.security.GeneralSecurityExceptionprotected int resolveInitializationVectorLength(PrivateKeyEncryptionContext encContext) throws java.security.GeneralSecurityException
resolveInitializationVectorLength in class AbstractPrivateKeyObfuscatorjava.security.GeneralSecurityExceptionpublic static final PrivateKeyEncryptionContext resolveEffectiveContext(PrivateKeyEncryptionContext encContext)