Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-637

Factor out ICheckSum and replace with System.Security.Cryptography.HashAlgorithm

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nightowl888 Shad Storhaug
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5h
                5h
                Remaining:
                Remaining Estimate - 5h
                5h
                Logged:
                Time Spent - Not Specified
                Not Specified