Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriktsarpalis committed Feb 14, 2020
1 parent 25ecf23 commit 887f164
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected sealed override void Dispose(bool disposing)
if (_cngKey != null)
{
_cngKey.Dispose();
_cngKey = null;
_cngKey = null!;
}
}

Expand All @@ -120,7 +120,7 @@ private void Reset()
}
}

private CngKey? _cngKey;
private CngKey _cngKey;
private readonly bool _encrypting;

private static readonly CngProperty s_ECBMode =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ internal byte[] ExportPkcs8KeyBlob(
out byte[]? allocated);

Debug.Assert(ret);
Debug.Assert(allocated != null); // on account of allocate parameter being true
Debug.Assert(allocated != null); // since `allocate: true`
return allocated;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public override void GenerateKey(ECCurve curve)

private CngKey GetKey()
{
CngKey? key = null;
CngKey key;

if (_core.IsKeyGeneratedNamedCurve())
{
Expand All @@ -108,7 +108,7 @@ private CngKey GetKey()
}
else
{
CngAlgorithm? algorithm = null;
CngAlgorithm algorithm;
int keySize = 0;

// Map the current key size to a CNG algorithm name
Expand Down

0 comments on commit 887f164

Please sign in to comment.