Interface MessageCrypto<MetadataT,​BuilderT>


  • @Public
    @Stable
    public interface MessageCrypto<MetadataT,​BuilderT>
    Interface that abstracts the method to encrypt/decrypt message for End to End Encryption.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int IV_LEN  
    • Method Detail

      • 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
        Parameters:
        inputLen - the length of the input buffer
        Returns:
        the maximum size of the buffer to hold the encrypted/decrypted version of the input buffer
      • decrypt

        boolean decrypt​(java.util.function.Supplier<MetadataT> messageMetadataSupplier,
                        java.nio.ByteBuffer payload,
                        java.nio.ByteBuffer outBuffer,
                        CryptoKeyReader keyReader)