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) |
protected byte[] |
generateInitializationVector(int keyLength) |
List<Integer> |
getSupportedKeySizes() |
static PrivateKeyEncryptionContext |
resolveEffectiveContext(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
bytes - Original bytesencContext - The encryption contextencryptIt - If true then encrypt the original bytes, otherwise decrypt themGeneralSecurityException - If cannot encrypt/decryptpublic 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 byte[] generateInitializationVector(int keyLength)
generateInitializationVector in class AbstractPrivateKeyObfuscatorpublic static final PrivateKeyEncryptionContext resolveEffectiveContext(PrivateKeyEncryptionContext encContext)
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.