mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Refactor] Use collection expressions.
This commit is contained in:
@@ -77,7 +77,7 @@ public sealed class Sha1Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public sealed class Sha1Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(Array.Empty<byte>(), 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var sha1Output = new StringBuilder();
|
||||
|
||||
if(_provider.Hash is null) return null;
|
||||
|
||||
Reference in New Issue
Block a user