[Blazor] Adds a version to the Circuit ID purpose (#13250)

* It prevents older payloads from being unprotected should we ever change the format.
* Follows recommended practices when using data protection.
This commit is contained in:
Javier Calvarro Nelson 2019-08-19 17:58:56 +02:00 committed by GitHub
parent d9148a6523
commit 5678f84d60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Components.Server.Circuits
// Generates strong cryptographic ids for circuits that are protected with authenticated encryption.
internal class CircuitIdFactory
{
private const string CircuitIdProtectorPurpose = "Microsoft.AspNetCore.Components.Server.CircuitIdFactory";
private const string CircuitIdProtectorPurpose = "Microsoft.AspNetCore.Components.Server.CircuitIdFactory,V1";
// We use 64 bytes, where the last 32 are the public version of the id.
// This way we can always recover the public id from the secret form.