From 5aa3529dcb781ce9e07c16b1caa4fd2b4aec8125 Mon Sep 17 00:00:00 2001 From: PRIYANSHU AGRAWAL Date: Tue, 6 Feb 2018 21:48:12 +0530 Subject: [PATCH] Merge PR #297 - minor code cleanup - remove duplicate allocation of DateTimeOffset --- .../TimeLimitedDataProtector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.DataProtection.Extensions/TimeLimitedDataProtector.cs b/src/Microsoft.AspNetCore.DataProtection.Extensions/TimeLimitedDataProtector.cs index 2037ce5f05..71e9c3c553 100644 --- a/src/Microsoft.AspNetCore.DataProtection.Extensions/TimeLimitedDataProtector.cs +++ b/src/Microsoft.AspNetCore.DataProtection.Extensions/TimeLimitedDataProtector.cs @@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.DataProtection // Not expired - split and return payload byte[] retVal = new byte[plaintextWithHeader.Length - 8]; Buffer.BlockCopy(plaintextWithHeader, 8, retVal, 0, retVal.Length); - expiration = new DateTimeOffset((long)utcTicksExpiration, TimeSpan.Zero); + expiration = embeddedExpiration; return retVal; } catch (Exception ex) when (ex.RequiresHomogenization())