mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
Add null reference checks.
This commit is contained in:
@@ -74,6 +74,9 @@ public sealed class Sha256Context : IChecksum
|
||||
_provider.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
|
||||
var sha256Output = new StringBuilder();
|
||||
|
||||
if(_provider.Hash is null)
|
||||
return null;
|
||||
|
||||
foreach(byte h in _provider.Hash)
|
||||
sha256Output.Append(h.ToString("x2"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user