Skip to content

Conversation

@bartonjs
Copy link
Member

This adds

  • int IncrementalHash::GetHashAndReset(Span<byte>)
  • byte[] IncrementalHash::GetCurrentHash()
  • int IncrementalHash::GetCurrentHash(Span<byte>)
  • bool IncrementalHash::TryGetCurrentHash(Span<byte>, out int)

While simplifying the internal logic (all three variants of GetHashAndReset collapse to the PAL int GetHashAndReset(Span<byte>), and similarly for all three variants of GetCurrentHash).

This change also drives the code coverage for the IncrementalHash class up to 100%.

Fixes #1968.

@bartonjs bartonjs added this to the 5.0.0 milestone Jun 15, 2020
@bartonjs bartonjs self-assigned this Jun 15, 2020
@ghost
Copy link

ghost commented Jun 15, 2020

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq
Notify danmosemsft if you want to be subscribed.

@Dotnet-GitSync-Bot
Copy link
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@vcsjones
Copy link
Member

Same link

The functions EVP_DigestInit(), EVP_DigestFinal() and EVP_MD_CTX_copy() are obsolete but are retained to maintain compatibility with existing code.

@bartonjs
Copy link
Member Author

Bah, should've linked to the 1.1.0 version 😁

@bartonjs bartonjs merged commit 10abe8d into dotnet:master Jun 23, 2020
@bartonjs bartonjs deleted the getcurrenthash branch June 23, 2020 17:28
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
@bartonjs bartonjs removed their assignment Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incremental Hash, allowing to continue to hash

5 participants