public class RepositoryEncryptorUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static int |
CONTENT_HEADER_SIZE |
private static byte[] |
EMPTY_IV |
private static int |
IV_LENGTH |
private static org.slf4j.Logger |
logger |
private static int |
METADATA_DEFAULT_LENGTH |
private static int |
MIN_METADATA_LENGTH |
private static List<String> |
SUPPORTED_VERSIONS |
private static String |
VERSION |
| Constructor and Description |
|---|
RepositoryEncryptorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static KeyProvider |
buildKeyProvider(NiFiProperties niFiProperties,
SecretKey masterKey,
RepositoryType repositoryType) |
static byte[] |
extractCipherBytes(byte[] encryptedRecord,
RepositoryObjectEncryptionMetadata metadata) |
static RepositoryObjectEncryptionMetadata |
extractEncryptionMetadata(byte[] encryptedRecord) |
static RepositoryObjectEncryptionMetadata |
extractEncryptionMetadata(InputStream encryptedRecord) |
static Cipher |
initCipher(AESKeyedCipherProvider aesKeyedCipherProvider,
EncryptionMethod method,
int mode,
SecretKey key,
byte[] ivBytes) |
static byte[] |
serializeEncryptionMetadata(RepositoryObjectEncryptionMetadata metadata) |
private static final org.slf4j.Logger logger
private static final int CONTENT_HEADER_SIZE
private static final int IV_LENGTH
private static final byte[] EMPTY_IV
private static final String VERSION
private static final int MIN_METADATA_LENGTH
private static final int METADATA_DEFAULT_LENGTH
public static byte[] serializeEncryptionMetadata(RepositoryObjectEncryptionMetadata metadata) throws IOException
IOExceptionpublic static Cipher initCipher(AESKeyedCipherProvider aesKeyedCipherProvider, EncryptionMethod method, int mode, SecretKey key, byte[] ivBytes) throws EncryptionException
EncryptionExceptionpublic static RepositoryObjectEncryptionMetadata extractEncryptionMetadata(byte[] encryptedRecord) throws EncryptionException, IOException, ClassNotFoundException
public static RepositoryObjectEncryptionMetadata extractEncryptionMetadata(InputStream encryptedRecord) throws EncryptionException, IOException, ClassNotFoundException
public static byte[] extractCipherBytes(byte[] encryptedRecord,
RepositoryObjectEncryptionMetadata metadata)
public static KeyProvider buildKeyProvider(NiFiProperties niFiProperties, SecretKey masterKey, RepositoryType repositoryType) throws KeyManagementException
KeyManagementExceptionCopyright © 2019 Apache NiFi Project. All rights reserved.