接口 MessageCrypto<MetadataT,BuilderT>
Interface that abstracts the method to encrypt/decrypt message for End to End Encryption.
-
字段概要
字段 -
方法概要
修饰符和类型方法说明void
addPublicKeyCipher
(Set<String> keyNames, CryptoKeyReader keyReader) boolean
decrypt
(Supplier<MetadataT> messageMetadataSupplier, ByteBuffer payload, ByteBuffer outBuffer, CryptoKeyReader keyReader) void
encrypt
(Set<String> encKeys, CryptoKeyReader keyReader, Supplier<BuilderT> messageMetadataBuilderSupplier, ByteBuffer payload, ByteBuffer outBuffer) int
getMaxOutputSize
(int inputLen) Return the maximum for a given buffer to be encrypted or decrypted.boolean
removeKeyCipher
(String keyName)
-
字段详细资料
-
IV_LEN
static final int IV_LEN- 另请参阅:
-
-
方法详细资料
-
addPublicKeyCipher
void addPublicKeyCipher(Set<String> keyNames, CryptoKeyReader keyReader) throws PulsarClientException.CryptoException -
removeKeyCipher
-
getMaxOutputSize
int getMaxOutputSize(int inputLen) Return the maximum for a given buffer to be encrypted or decrypted. This is meant to allow to pre-allocate a buffer with enough space to be passed as- 参数:
inputLen
- the length of the input buffer- 返回:
- the maximum size of the buffer to hold the encrypted/decrypted version of the input buffer
-
encrypt
void encrypt(Set<String> encKeys, CryptoKeyReader keyReader, Supplier<BuilderT> messageMetadataBuilderSupplier, ByteBuffer payload, ByteBuffer outBuffer) throws PulsarClientException -
decrypt
boolean decrypt(Supplier<MetadataT> messageMetadataSupplier, ByteBuffer payload, ByteBuffer outBuffer, CryptoKeyReader keyReader)
-