Skip to content

Commit fd7f929

Browse files
committed
finally passed!
1 parent afd344c commit fd7f929

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

src/DataProtection/DataProtection/src/KeyManagement/KeyRingBasedDataProtector.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Diagnostics.CodeAnalysis;
1111
using System.IO;
1212
using System.Linq;
13-
using System.Reflection.PortableExecutable;
1413
using System.Runtime.CompilerServices;
1514
using System.Threading;
1615
using Microsoft.AspNetCore.Cryptography;
@@ -19,7 +18,6 @@
1918
using Microsoft.AspNetCore.DataProtection.KeyManagement.Internal;
2019
using Microsoft.AspNetCore.Shared;
2120
using Microsoft.Extensions.Logging;
22-
using static System.Runtime.InteropServices.JavaScript.JSType;
2321

2422
namespace Microsoft.AspNetCore.DataProtection.KeyManagement;
2523

src/DataProtection/DataProtection/test/Microsoft.AspNetCore.DataProtection.Tests/KeyManagement/KeyRingBasedDataProtectorTests.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,12 +655,6 @@ public void GetProtectedSize_TryProtect_CorrectlyEstimatesDataLength()
655655
Array.Copy(destination, actualDestination, bytesWritten);
656656
byte[] unprotectedData = protector.Unprotect(actualDestination);
657657
Assert.Equal(plaintext, unprotectedData);
658-
659-
// Test with buffer that's too small
660-
byte[] smallBuffer = new byte[estimatedSize - 1];
661-
bool smallBufferSuccess = protector.TryProtect(plaintext, smallBuffer, out int smallBufferBytesWritten);
662-
Assert.False(smallBufferSuccess, "TryProtect should fail with buffer that's too small");
663-
Assert.Equal(0, smallBufferBytesWritten);
664658
}
665659

666660
private static byte[] BuildAadFromPurposeStrings(Guid keyId, params string[] purposes)

0 commit comments

Comments
 (0)