Class DecryptingReadableByteChannel

    • Constructor Detail

      • DecryptingReadableByteChannel

        public DecryptingReadableByteChannel​(ReadableByteChannel src,
                                             Cryptor cryptor,
                                             boolean authenticate)
        Creates a DecryptingReadableByteChannel that decrypts a whole ciphertext file beginning at its first byte.
        Parameters:
        src - A ciphertext channel positioned at the begin of the file header
        cryptor - The cryptor to use
        authenticate - Set to false to skip ciphertext authentication (may not be supported)
      • DecryptingReadableByteChannel

        public DecryptingReadableByteChannel​(ReadableByteChannel src,
                                             Cryptor cryptor,
                                             boolean authenticate,
                                             FileHeader header,
                                             long firstChunk)
        Creates a DecryptingReadableByteChannel with a previously read header, allowing to start decryption at any chunk.
        Parameters:
        src - A ciphertext channel positioned at the beginning of the given firstChunk
        cryptor - The cryptor to use
        authenticate - Set to false to skip ciphertext authentication (may not be supported)
        header - The file's header
        firstChunk - The index of the chunk at which the src channel is positioned