mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: All refactor in DiscImageChef.Checksums.
This commit is contained in:
@@ -87,7 +87,7 @@ namespace DiscImageChef.Checksums
|
||||
sha384Provider.TransformFinalBlock(new byte[0], 0, 0);
|
||||
StringBuilder sha384Output = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < sha384Provider.Hash.Length; i++) sha384Output.Append(sha384Provider.Hash[i].ToString("x2"));
|
||||
foreach(byte h in sha384Provider.Hash) sha384Output.Append(h.ToString("x2"));
|
||||
|
||||
return sha384Output.ToString();
|
||||
}
|
||||
@@ -115,7 +115,7 @@ namespace DiscImageChef.Checksums
|
||||
hash = sha384Provider.ComputeHash(fileStream);
|
||||
StringBuilder sha384Output = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < hash.Length; i++) sha384Output.Append(hash[i].ToString("x2"));
|
||||
foreach(byte h in hash) sha384Output.Append(h.ToString("x2"));
|
||||
|
||||
fileStream.Close();
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace DiscImageChef.Checksums
|
||||
hash = sha384Provider.ComputeHash(data, 0, (int)len);
|
||||
StringBuilder sha384Output = new StringBuilder();
|
||||
|
||||
for(int i = 0; i < hash.Length; i++) sha384Output.Append(hash[i].ToString("x2"));
|
||||
foreach(byte h in hash) sha384Output.Append(h.ToString("x2"));
|
||||
|
||||
return sha384Output.ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user