8 implementations of Unprotect
Aspire.Dashboard.Tests (1)
LocalBrowserStorageTests.cs (1)
164public byte[] Unprotect(byte[] protectedData)
Microsoft.AspNetCore.Authentication.Test (1)
CookieTests.cs (1)
1746public byte[] Unprotect(byte[] protectedData)
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentResultTest.cs (1)
507public byte[] Unprotect(byte[] protectedData) => throw new NotImplementedException();
Microsoft.AspNetCore.Components.Server.Tests (1)
ProtectedBrowserStorageTest.cs (1)
333public byte[] Unprotect(byte[] protectedData)
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingBasedDataProtector.cs (1)
179public byte[] Unprotect(byte[] protectedData)
Microsoft.AspNetCore.DataProtection.Extensions (2)
DataProtectionAdvancedExtensions.cs (1)
123public byte[] Unprotect(byte[] protectedData)
TimeLimitedDataProtector.cs (1)
122byte[] IDataProtector.Unprotect(byte[] protectedData)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
443public byte[] Unprotect(byte[] protectedData)
34 references to Unprotect
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenSerializer.cs (1)
46var unprotectedBytes = _cryptoSystem.Unprotect(tokenBytes);
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenSerializerTest.cs (1)
145mockCryptoSystem.Setup(o => o.Unprotect(It.IsAny<byte[]>()))
Microsoft.AspNetCore.Authentication (1)
SecureDataFormat.cs (1)
77var userData = protector.Unprotect(protectedData);
Microsoft.AspNetCore.Components.Endpoints (1)
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
21DeserializeState(_protector.Unprotect(Convert.FromBase64String(existingState)));
Microsoft.AspNetCore.Components.Server (3)
Circuits\CircuitIdFactory.cs (1)
60var unprotectedBytes = _protector.Unprotect(protectedBytes);
Circuits\ServerComponentDeserializer.cs (1)
247var unprotectedBytes = _dataProtector.Unprotect(payload);
src\Shared\Components\ProtectedPrerenderComponentApplicationStore.cs (1)
21DeserializeState(_protector.Unprotect(Convert.FromBase64String(existingState)));
Microsoft.AspNetCore.DataProtection.Abstractions (1)
DataProtectionCommonExtensions.cs (1)
191byte[] plaintextAsBytes = protector.Unprotect(protectedDataAsBytes);
Microsoft.AspNetCore.DataProtection.Abstractions.Tests (2)
DataProtectionCommonExtensionsTests.cs (2)
289mockProtector.Setup(p => p.Unprotect(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 })).Returns(new byte[] { 0xff }); 304mockProtector.Setup(p => p.Unprotect(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 })).Returns(new byte[] { 0x48, 0x65, 0x6c, 0x6c, 0x6f });
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
73byte[] plaintextWithHeader = GetInnerProtectorWithTimeLimitedPurpose().Unprotect(protectedData);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (5)
TimeLimitedDataProtectorTests.cs (5)
72mockInnerProtector.Setup(o => o.CreateProtector(TimeLimitedPurposeString).Unprotect(new byte[] { 0x10, 0x11 })).Returns( 96mockInnerProtector.Setup(o => o.CreateProtector(TimeLimitedPurposeString).Unprotect(new byte[] { 0x10, 0x11 })).Returns( 118mockInnerProtector.Setup(o => o.CreateProtector(TimeLimitedPurposeString).Unprotect(new byte[] { 0x10, 0x11 })).Returns( 139mockInnerProtector.Setup(o => o.CreateProtector(TimeLimitedPurposeString).Unprotect(new byte[] { 0x10, 0x11 })).Throws(new Exception("How exceptional!")); 170Assert.Throws<CryptographicException>(() => ephemeralProtector.Unprotect(timeLimitedProtectedPayload));
Microsoft.AspNetCore.DataProtection.Tests (14)
EphemeralDataProtectionProviderTests.cs (3)
25byte[] unprotectedBytes = dataProtector2.Unprotect(protectedBytes); 42byte[] unprotectedBytes = dataProtector2.Unprotect(protectedBytes); 57byte[] unprotectedBytes = dataProtector2.Unprotect(protectedBytes);
KeyManagement\KeyRingBasedDataProtectorTests.cs (11)
136ExceptionAssert.ThrowsArgumentNull(() => protector.Unprotect(protectedData: null), "protectedData"); 153var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(badProtectedPayload)); 171var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(badProtectedPayload)); 189var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(badProtectedPayload)); 220var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(protectedData)); 273var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(protectedData)); 309var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(protectedData)); 344var result = protector.Unprotect(protectedData); 407var ex = ExceptionAssert2.ThrowsCryptographicException(() => protector.Unprotect(protectedData)); 493byte[] retVal = protector.Unprotect(protectedData); 543byte[] retVal = protector.Unprotect(protectedData);
Microsoft.AspNetCore.Identity (1)
DataProtectorTokenProvider.cs (1)
112var unprotectedData = Protector.Unprotect(Convert.FromBase64String(token));
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
CookieTempDataProvider.cs (1)
74var unprotectedData = _dataProtector.Unprotect(protectedData);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
CookieTempDataProviderTest.cs (1)
73.Setup(d => d.Unprotect(It.IsAny<byte[]>()))
Microsoft.AspNetCore.Session (1)
CookieProtection.cs (1)
41var userData = protector.Unprotect(protectedData);