Class DecryptedRangedStreamProvider

java.lang.Object
org.opensearch.common.crypto.DecryptedRangedStreamProvider

public class DecryptedRangedStreamProvider extends Object
Contains adjusted range of partial encrypted content which needs to be used for decryption.
  • Constructor Details

    • DecryptedRangedStreamProvider

      public DecryptedRangedStreamProvider(long[] adjustedRange, UnaryOperator<InputStream> decryptedStreamProvider)
      To construct adjusted encrypted range.
      Parameters:
      adjustedRange - range of partial encrypted content which needs to be used for decryption.
      decryptedStreamProvider - stream provider for decryption and range re-adjustment.
  • Method Details

    • getAdjustedRange

      public long[] getAdjustedRange()
      Adjusted range of partial encrypted content which needs to be used for decryption.
      Returns:
      adjusted range
    • getDecryptedStreamProvider

      public UnaryOperator<InputStream> getDecryptedStreamProvider()
      A utility stream provider which supplies the stream responsible for decrypting the content and reading the desired range of decrypted content by skipping extra content which got decrypted as a result of range adjustment.
      Returns:
      stream provider for decryption and supplying the desired range of content.