public abstract class EncodedSensitivePropertyProvider extends Object implements SensitivePropertyProvider
| Modifier and Type | Field and Description |
|---|---|
private static Base64.Decoder |
DECODER |
private static Base64.Encoder |
ENCODER |
private static Charset |
VALUE_CHARACTER_SET |
| Constructor and Description |
|---|
EncodedSensitivePropertyProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract byte[] |
getDecrypted(byte[] bytes)
Get decrypted byte array representation of encrypted bytes
|
protected abstract byte[] |
getEncrypted(byte[] bytes)
Get encrypted byte array representation of bytes
|
String |
protect(String unprotectedValue,
ProtectedPropertyContext context)
Protect property value and return Base64-encoded representation of encrypted bytes
|
String |
unprotect(String protectedValue,
ProtectedPropertyContext context)
Unprotect Base64-encoded representation of encrypted property value and return string
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanUp, getIdentifierKey, isSupportedprivate static final Charset VALUE_CHARACTER_SET
private static final Base64.Encoder ENCODER
private static final Base64.Decoder DECODER
public String protect(String unprotectedValue, ProtectedPropertyContext context)
protect in interface SensitivePropertyProviderunprotectedValue - Unprotected property value to be encryptedcontext - Property Contextpublic String unprotect(String protectedValue, ProtectedPropertyContext context)
unprotect in interface SensitivePropertyProviderprotectedValue - Base64-encoded representation of encrypted bytescontext - Property Contextprotected abstract byte[] getEncrypted(byte[] bytes)
bytes - Unprotected bytesprotected abstract byte[] getDecrypted(byte[] bytes)
bytes - Encrypted bytesCopyright © 2023 Apache NiFi Project. All rights reserved.