in encryption/src/main/java/org/apache/solr/encryption/EncryptionTransactionLog.java [249:270]
public ChannelFastInputStream open(FileChannel channel, long position) throws IOException {
EncryptionDirectory directory = directorySupplier.get();
try {
String keyRef = readEncryptionHeader(channel);
if (keyRef != null) {
// The IndexInput has to be wrapped to be decrypted with the key.
DecryptingChannelInputStream dcis =
createDecryptingChannelInputStream(
channel,
ENCRYPTION_KEY_HEADER_LENGTH,
position,
directory.getKeySecret(keyRef),
directory.getEncrypterFactory());
ivHolder.iv = dcis.getIv();
return dcis;
}
} finally {
directorySupplier.release(directory);
}
ivHolder.iv = null;
return CHANNEL_INPUT_STREAM_OPENER.open(channel, position);
}