Merge PR #297 - minor code cleanup - remove duplicate allocation of DateTimeOffset

This commit is contained in:
PRIYANSHU AGRAWAL 2018-02-06 21:48:12 +05:30 committed by Nate McMaster
parent d0dea3ca5f
commit 5aa3529dcb
1 changed files with 1 additions and 1 deletions

View File

@ -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())