Skip to content

Commit

Permalink
Add obsolete constructor and block its usage with obsolete (Fixes #24)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Mar 2, 2024
1 parent 25d9165 commit 2213abe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Blake3/Hasher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ public unsafe struct Hasher : IDisposable
/// </summary>
private const int LimitPreemptive = 1024;

/// <summary>
/// Invalid constructor.
/// </summary>
[Obsolete("Use New() to create a new instance of Hasher", true)]
public Hasher()
{
}

private Hasher(void* hasher)
{
_hasher = hasher;
Expand Down

0 comments on commit 2213abe

Please sign in to comment.