mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Use collection expression syntax.
This commit is contained in:
@@ -60,7 +60,7 @@ public sealed class Md5Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed class Md5Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var md5Output = new StringBuilder();
|
||||
|
||||
foreach(byte h in _provider.Hash) md5Output.Append(h.ToString("x2"));
|
||||
|
||||
@@ -60,7 +60,7 @@ public sealed class Sha1Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed class Sha1Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var sha1Output = new StringBuilder();
|
||||
|
||||
foreach(byte h in _provider.Hash) sha1Output.Append(h.ToString("x2"));
|
||||
|
||||
@@ -60,7 +60,7 @@ public sealed class Sha256Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed class Sha256Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var sha256Output = new StringBuilder();
|
||||
|
||||
foreach(byte h in _provider.Hash) sha256Output.Append(h.ToString("x2"));
|
||||
|
||||
@@ -60,7 +60,7 @@ public sealed class Sha384Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed class Sha384Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var sha384Output = new StringBuilder();
|
||||
|
||||
foreach(byte h in _provider.Hash) sha384Output.Append(h.ToString("x2"));
|
||||
|
||||
@@ -60,7 +60,7 @@ public sealed class Sha512Context : IChecksum
|
||||
/// <summary>Returns a byte array of the hash value.</summary>
|
||||
public byte[] Final()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
|
||||
return _provider.Hash;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public sealed class Sha512Context : IChecksum
|
||||
/// <summary>Returns a hexadecimal representation of the hash value.</summary>
|
||||
public string End()
|
||||
{
|
||||
_provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
_provider.TransformFinalBlock([], 0, 0);
|
||||
var sha512Output = new StringBuilder();
|
||||
|
||||
foreach(byte h in _provider.Hash) sha512Output.Append(h.ToString("x2"));
|
||||
|
||||
@@ -60,12 +60,12 @@ public sealed class SpamSumContext : IChecksum
|
||||
|
||||
//"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
readonly byte[] _b64 =
|
||||
{
|
||||
[
|
||||
0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52,
|
||||
0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
|
||||
0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31,
|
||||
0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F
|
||||
};
|
||||
];
|
||||
|
||||
FuzzyState _self;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user