T - The type to be serialized from (applied to the wrapped serializer)public class EncryptingSerializer<T> extends SerdeCryptoBase implements org.apache.kafka.common.serialization.Serializer<T>
DecryptingDeserializer
Configuration
MMLLLHH..HHEEEE..EEEEIIII..IIIOOOOO....OOOOOO
Note: As Producers are multithreading-safe this serializer is also thread-safe
| Modifier and Type | Field and Description |
|---|---|
static String |
CRYPTO_VALUE_SERIALIZER |
CRYPTO_AES_KEY_LEN, CRYPTO_HASH_METHOD, CRYPTO_IGNORE_DECRYPT_FAILURES, CRYPTO_RSA_PRIVATEKEY_FILEPATH, CRYPTO_RSA_PUBLICKEY_FILEPATH, DEFAULT_TRANSFORMATION| Constructor and Description |
|---|
EncryptingSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(Map<String,?> configs,
boolean isKey) |
void |
newKey()
Generate new AES key for the current thread
|
byte[] |
serialize(String topic,
T data) |
concatenate, crypt, init, newInstancepublic static final String CRYPTO_VALUE_SERIALIZER
public void configure(Map<String,?> configs, boolean isKey)
configure in interface org.apache.kafka.common.serialization.Serializer<T>public byte[] serialize(String topic, T data)
serialize in interface org.apache.kafka.common.serialization.Serializer<T>public void close()
close in interface org.apache.kafka.common.serialization.Serializer<T>public void newKey()
newKey in class SerdeCryptoBaseCopyright © 2016. All Rights Reserved.