Some minor cleanups and optimizations (#4174)
* Replace Array.Clear(x, 0, x.Length) with Array.Clear(x) * Use DateTime.UnixEpoch field * Replace SHA256.ComputeHash calls with static SHA256.HashData call More performant and avoids the need to initialize a SHA256 instance.
This commit is contained in:
@ -142,14 +142,9 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
||||
|
||||
_owner.CpuMemory.Read(nroAddress, nroData);
|
||||
|
||||
byte[] nroHash = null;
|
||||
|
||||
MemoryStream stream = new MemoryStream(nroData);
|
||||
|
||||
using (SHA256 hasher = SHA256.Create())
|
||||
{
|
||||
nroHash = hasher.ComputeHash(stream);
|
||||
}
|
||||
byte[] nroHash = SHA256.HashData(stream);
|
||||
|
||||
if (!IsNroHashPresent(nroHash))
|
||||
{
|
||||
|
Reference in New Issue
Block a user