You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Shad Storhaug (Jira)" <ji...@apache.org> on 2021/12/09 18:05:00 UTC

[jira] [Closed] (LUCENENET-637) Factor out ICheckSum and replace with System.Security.Cryptography.HashAlgorithm

     [ https://issues.apache.org/jira/browse/LUCENENET-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shad Storhaug closed LUCENENET-637.
-----------------------------------
    Resolution: Won't Do

Closed @ GitHub: https://github.com/apache/lucenenet/issues/255

> Factor out ICheckSum and replace with System.Security.Cryptography.HashAlgorithm
> --------------------------------------------------------------------------------
>
>                 Key: LUCENENET-637
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-637
>             Project: Lucene.Net
>          Issue Type: Task
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 4.8.0
>            Reporter: Shad Storhaug
>            Priority: Minor
>              Labels: help-wanted, up-for-grabs
>   Original Estimate: 5h
>  Remaining Estimate: 5h
>
> {{IChecksum}} was brought over from Java in order to plug in the {{CRC32}} class.
> However, .NET already has its own abstract class, [HashAlgorithm|https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.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|https://www.nuget.org/packages/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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)