Skip to content

Commit 23e00e3

Browse files
committed
Hash the prekey to avoid keeping a reference to a larger set ofbytes
1 parent 1444089 commit 23e00e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Components/Components/src/SupplyParameterFromPersistentComponentStateValueProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private static string GetParentComponentType(ComponentState componentState) =>
264264
componentState.LogicalParentComponentState == null ? "" : GetComponentType(componentState.LogicalParentComponentState);
265265

266266
private static byte[] KeyFactory((string parentComponentType, string componentType, string propertyName) parts) =>
267-
Encoding.UTF8.GetBytes(string.Join(".", parts.parentComponentType, parts.componentType, parts.propertyName));
267+
SHA256.HashData(Encoding.UTF8.GetBytes(string.Join(".", parts.parentComponentType, parts.componentType, parts.propertyName)));
268268

269269
private static bool IsSerializableKey(object key)
270270
{

0 commit comments

Comments
 (0)