Round 2 of nullable checks

This commit is contained in:
JustArchi
2020-08-23 20:45:24 +02:00
parent f99043db30
commit b3d476dea4
34 changed files with 187 additions and 338 deletions

View File

@@ -257,7 +257,7 @@ namespace ArchiSteamFarm {
byte[] identitySecret;
try {
identitySecret = Convert.FromBase64String(IdentitySecret);
identitySecret = Convert.FromBase64String(IdentitySecret!);
} catch (FormatException e) {
Bot.ArchiLogger.LogGenericException(e);
Bot.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(IdentitySecret)));
@@ -282,7 +282,7 @@ namespace ArchiSteamFarm {
Array.Copy(timeArray, buffer, 8);
if (!string.IsNullOrEmpty(tag)) {
Array.Copy(Encoding.UTF8.GetBytes(tag), 0, buffer, 8, bufferSize - 8);
Array.Copy(Encoding.UTF8.GetBytes(tag!), 0, buffer, 8, bufferSize - 8);
}
using HMACSHA1 hmac = new HMACSHA1(identitySecret);
@@ -300,7 +300,7 @@ namespace ArchiSteamFarm {
byte[] sharedSecret;
try {
sharedSecret = Convert.FromBase64String(SharedSecret);
sharedSecret = Convert.FromBase64String(SharedSecret!);
} catch (FormatException e) {
Bot.ArchiLogger.LogGenericException(e);
Bot.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(SharedSecret)));