public class DESPrivateKeyObfuscator extends AbstractPrivateKeyObfuscator
| Modifier and Type | Field and Description |
|---|---|
static List<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) |
List<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 DESPrivateKeyObfuscator INSTANCE
public byte[] applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt)
throws GeneralSecurityException,
IOException
bytes - Original bytesencContext - The encryption contextencryptIt - If true then encrypt the original bytes, otherwise decrypt themGeneralSecurityException - If cannot encrypt/decryptIOException - If malformed inputpublic List<Integer> getSupportedKeySizes()
List of the supported key sizes - Note: every call returns a and un-modifiable
instance.protected int resolveKeyLength(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
resolveKeyLength in class AbstractPrivateKeyObfuscatorGeneralSecurityExceptionprotected int resolveInitializationVectorLength(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
resolveInitializationVectorLength in class AbstractPrivateKeyObfuscatorGeneralSecurityExceptionpublic static final PrivateKeyEncryptionContext resolveEffectiveContext(PrivateKeyEncryptionContext encContext)
Copyright © 2018–2020 The Apache Software Foundation. All rights reserved.