Please install Geralt via NuGet.
Added
- The
IncrementalBLAKE2b
state can now be cached. This means static data at the beginning (e.g., the same key) can be processed just once for repeated calls, improving performance. Note thatCacheState()
can only cache the state once. Each subsequent call will overwrite the previously cached state. This was done for backwards compatibility, to allow zeroing the cached state, and because you shouldn't be able to cache the state withIncrementalPoly1305
, for example.
Changed
- Now using some new language features, like LibraryImport.
- The state in incremental classes now gets zeroed if there's an exception/
Dispose()
is manually called. - The byte array buffers in
Encodings.ToHex()
andEncodings.ToBase64()
now get zeroed after a string is returned. BLAKE2b.ComputeHash()
with a stream now throwsInvalidOperationException
if the stream can't be read. Previously, this would've been aNotSupportedException
from the .NET API.- Tests are now run on .NET 9 as well as .NET 8.
- The test packages have been updated.
Fixed
stackalloc
is no longer used forEncodings.ToHex()
andEncodings.ToBase64()
, which could've resulted in aStackOverflowException
with large enough inputs.
Removed
- .NET 6 is no longer targeted since it's out of support.