接口 MessageCrypto<MetadataT,BuilderT>
-
-
字段概要
字段 修饰符和类型 字段 说明 static intIV_LEN
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidaddPublicKeyCipher(java.util.Set<java.lang.String> keyNames, CryptoKeyReader keyReader)booleandecrypt(java.util.function.Supplier<MetadataT> messageMetadataSupplier, java.nio.ByteBuffer payload, java.nio.ByteBuffer outBuffer, CryptoKeyReader keyReader)voidencrypt(java.util.Set<java.lang.String> encKeys, CryptoKeyReader keyReader, java.util.function.Supplier<BuilderT> messageMetadataBuilderSupplier, java.nio.ByteBuffer payload, java.nio.ByteBuffer outBuffer)intgetMaxOutputSize(int inputLen)Return the maximum for a given buffer to be encrypted or decrypted.booleanremoveKeyCipher(java.lang.String keyName)
-
-
-
字段详细资料
-
IV_LEN
static final int IV_LEN
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
addPublicKeyCipher
void addPublicKeyCipher(java.util.Set<java.lang.String> keyNames, CryptoKeyReader keyReader) throws PulsarClientException.CryptoException
-
removeKeyCipher
boolean removeKeyCipher(java.lang.String keyName)
-
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(java.util.Set<java.lang.String> encKeys, CryptoKeyReader keyReader, java.util.function.Supplier<BuilderT> messageMetadataBuilderSupplier, java.nio.ByteBuffer payload, java.nio.ByteBuffer outBuffer) throws PulsarClientException
-
decrypt
boolean decrypt(java.util.function.Supplier<MetadataT> messageMetadataSupplier, java.nio.ByteBuffer payload, java.nio.ByteBuffer outBuffer, CryptoKeyReader keyReader)
-
-