public class AESPrivateKeyObfuscator extends AbstractPrivateKeyObfuscator
Modifier and Type | Field and Description |
---|---|
static String |
CIPHER_NAME |
static AESPrivateKeyObfuscator |
INSTANCE |
Constructor and Description |
---|
AESPrivateKeyObfuscator() |
Modifier and Type | Method and Description |
---|---|
byte[] |
applyPrivateKeyCipher(byte[] bytes,
PrivateKeyEncryptionContext encContext,
boolean encryptIt) |
static List<Integer> |
getAvailableKeyLengths() |
List<Integer> |
getSupportedKeySizes() |
protected int |
resolveKeyLength(PrivateKeyEncryptionContext encContext) |
appendPrivateKeyEncryptionContext, applyPrivateKeyCipher, deriveEncryptionKey, generateInitializationVector, generateInitializationVector, getCipherName
public static final String CIPHER_NAME
public static final AESPrivateKeyObfuscator INSTANCE
public List<Integer> getSupportedKeySizes()
List
of the supported key sizes - Note: every
call returns a and un-modifiable 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 inputprotected int resolveKeyLength(PrivateKeyEncryptionContext encContext) throws GeneralSecurityException
resolveKeyLength
in class AbstractPrivateKeyObfuscator
GeneralSecurityException
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.