1 implementation of Protect
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
48public byte[] Protect(byte[] plaintext, DateTimeOffset expiration)
5 references to Protect
Microsoft.AspNetCore.DataProtection.Extensions (2)
DataProtectionAdvancedExtensions.cs (2)
28return protector.Protect(plaintext, DateTimeOffset.UtcNow + lifetime); 120return _innerProtector.Protect(plaintext, Expiration);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (3)
DataProtectionAdvancedExtensionsTests.cs (3)
23mockDataProtector.Setup(o => o.Protect(plaintextAsBytes, expiration)).Returns(new byte[] { 0x01, 0x02 }); 39mockDataProtector.Setup(o => o.Protect(plaintextAsBytes, It.IsAny<DateTimeOffset>())) 62mockDataProtector.Setup(o => o.Protect(new byte[] { 0x11, 0x22, 0x33 }, It.IsAny<DateTimeOffset>()))