Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Won't Do
-
Lucene.Net 4.8.0
-
None
Description
IChecksum was brought over from Java in order to plug in the CRC32 class.
However, .NET already has its own abstract class, HashAlgorithm that is used to as a base class for all cryptographic algorithms. There are also several 3rd party implementations of CRC32 that implement HashAlgorithm that we could use (provided we drop support for .NET framework < 4.6.1). Crc32.NET claims to be one of the fastest implementations.
IChecksum is only utilized in a couple of places, but Lucene.NET's types should also be renamed accordingly to show they are using HashAlgorigthm instead of IChecksum:
- BufferedChecksum > BufferedHashAlgorithm
- BufferedChecksumIndexInput > BufferedHashAlgorithmIndexInput
The APIs between IChecksum and HashAlgorithm differ, but being that they serve the exact same purpose we should be able to make this work with a bit of refactoring.