diff options
| author | Berkan Diler <b.diler@gmx.de> | 2023-02-08 14:54:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-08 14:54:58 +0100 |
| commit | 99fc4fa61b0eb4c02eacdf7428ae14721349dece (patch) | |
| tree | 10c742080447e71780f936a8ae240484938938a3 /Ryujinx.HLE/HOS/Services | |
| parent | f6d5499a16a45347c08d444d76b1355c74194301 (diff) | |
Replace BitConverter.ToString(bytes).Replace("-", "") with Convert.ToHexString(bytes) (#4382)
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs | 6 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Caps/CaptureManager.cs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs index 011accd2..97240311 100644 --- a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs +++ b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs @@ -51,11 +51,11 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService var payload = new JwtPayload { - { "sub", BitConverter.ToString(rawUserId).Replace("-", "").ToLower() }, + { "sub", Convert.ToHexString(rawUserId).ToLower() }, { "aud", "ed9e2f05d286f7b8" }, - { "di", BitConverter.ToString(deviceId).Replace("-", "").ToLower() }, + { "di", Convert.ToHexString(deviceId).ToLower() }, { "sn", "XAW10000000000" }, - { "bs:did", BitConverter.ToString(deviceAccountId).Replace("-", "").ToLower() }, + { "bs:did", Convert.ToHexString(deviceAccountId).ToLower() }, { "iss", "https://e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com" }, { "typ", "id_token" }, { "iat", DateTimeOffset.UtcNow.ToUnixTimeSeconds() }, diff --git a/Ryujinx.HLE/HOS/Services/Caps/CaptureManager.cs b/Ryujinx.HLE/HOS/Services/Caps/CaptureManager.cs index 522de8e0..6320fe28 100644 --- a/Ryujinx.HLE/HOS/Services/Caps/CaptureManager.cs +++ b/Ryujinx.HLE/HOS/Services/Caps/CaptureManager.cs @@ -101,7 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.Caps }; // NOTE: The hex hash is a HMAC-SHA256 (first 32 bytes) using a hardcoded secret key over the titleId, we can simulate it by hashing the titleId instead. - string hash = BitConverter.ToString(SHA256.HashData(BitConverter.GetBytes(titleId))).Replace("-", "").Remove(0x20); + string hash = Convert.ToHexString(SHA256.HashData(BitConverter.GetBytes(titleId))).Remove(0x20); string folderPath = Path.Combine(_sdCardPath, "Nintendo", "Album", currentDateTime.Year.ToString("00"), currentDateTime.Month.ToString("00"), currentDateTime.Day.ToString("00")); string filePath = GenerateFilePath(folderPath, applicationAlbumEntry, currentDateTime, hash); |
