Merge PR #297 - minor code cleanup - remove duplicate allocation of DateTimeOffset
This commit is contained in:
parent
d0dea3ca5f
commit
5aa3529dcb
|
|
@ -100,7 +100,7 @@ namespace Microsoft.AspNetCore.DataProtection
|
||||||
// Not expired - split and return payload
|
// Not expired - split and return payload
|
||||||
byte[] retVal = new byte[plaintextWithHeader.Length - 8];
|
byte[] retVal = new byte[plaintextWithHeader.Length - 8];
|
||||||
Buffer.BlockCopy(plaintextWithHeader, 8, retVal, 0, retVal.Length);
|
Buffer.BlockCopy(plaintextWithHeader, 8, retVal, 0, retVal.Length);
|
||||||
expiration = new DateTimeOffset((long)utcTicksExpiration, TimeSpan.Zero);
|
expiration = embeddedExpiration;
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
catch (Exception ex) when (ex.RequiresHomogenization())
|
catch (Exception ex) when (ex.RequiresHomogenization())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue