diff --git a/MD5Context.cs b/MD5Context.cs
index eaf4f9a..7bb2285 100644
--- a/MD5Context.cs
+++ b/MD5Context.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
+using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
@@ -60,7 +61,7 @@ namespace Aaru.Checksums
/// Returns a byte array of the hash value.
public byte[] Final()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
return _provider.Hash;
}
@@ -69,7 +70,7 @@ namespace Aaru.Checksums
/// Returns a hexadecimal representation of the hash value.
public string End()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
var md5Output = new StringBuilder();
foreach(byte h in _provider.Hash)
diff --git a/SHA1Context.cs b/SHA1Context.cs
index 59c708f..bccf5ea 100644
--- a/SHA1Context.cs
+++ b/SHA1Context.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
+using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
@@ -60,7 +61,7 @@ namespace Aaru.Checksums
/// Returns a byte array of the hash value.
public byte[] Final()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
return _provider.Hash;
}
@@ -69,7 +70,7 @@ namespace Aaru.Checksums
/// Returns a hexadecimal representation of the hash value.
public string End()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
var sha1Output = new StringBuilder();
foreach(byte h in _provider.Hash)
diff --git a/SHA256Context.cs b/SHA256Context.cs
index 5d69ae7..dd5d0fa 100644
--- a/SHA256Context.cs
+++ b/SHA256Context.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
+using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
@@ -60,7 +61,7 @@ namespace Aaru.Checksums
/// Returns a byte array of the hash value.
public byte[] Final()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
return _provider.Hash;
}
@@ -69,7 +70,7 @@ namespace Aaru.Checksums
/// Returns a hexadecimal representation of the hash value.
public string End()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
var sha256Output = new StringBuilder();
foreach(byte h in _provider.Hash)
diff --git a/SHA384Context.cs b/SHA384Context.cs
index 4610eff..01dd52a 100644
--- a/SHA384Context.cs
+++ b/SHA384Context.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
+using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
@@ -60,7 +61,7 @@ namespace Aaru.Checksums
/// Returns a byte array of the hash value.
public byte[] Final()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
return _provider.Hash;
}
@@ -69,7 +70,7 @@ namespace Aaru.Checksums
/// Returns a hexadecimal representation of the hash value.
public string End()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
var sha384Output = new StringBuilder();
foreach(byte h in _provider.Hash)
diff --git a/SHA512Context.cs b/SHA512Context.cs
index 5b7ef4c..8535619 100644
--- a/SHA512Context.cs
+++ b/SHA512Context.cs
@@ -30,6 +30,7 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
+using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
@@ -60,7 +61,7 @@ namespace Aaru.Checksums
/// Returns a byte array of the hash value.
public byte[] Final()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
return _provider.Hash;
}
@@ -69,7 +70,7 @@ namespace Aaru.Checksums
/// Returns a hexadecimal representation of the hash value.
public string End()
{
- _provider.TransformFinalBlock(new byte[0], 0, 0);
+ _provider.TransformFinalBlock(Array.Empty(), 0, 0);
var sha512Output = new StringBuilder();
foreach(byte h in _provider.Hash)