Class ContentSecurityPolicyInlineExecutionFeatureExtensions
Extensions for IContentSecurityPolicyInlineExecutionFeature.
Inheritance
Inherited Members
Namespace: Lib.AspNetCore.Security.Http.Features
Assembly: Lib.AspNetCore.Security.dll
Syntax
public static class ContentSecurityPolicyInlineExecutionFeatureExtensions
Methods
ComputeAndAddScriptHash(IContentSecurityPolicyInlineExecutionFeature, String)
Computes the hash for given content by using current algorithm for scripts and adds it to scripts hashes collection.
Declaration
public static void ComputeAndAddScriptHash(this IContentSecurityPolicyInlineExecutionFeature cspFeature, string elementContent)
Parameters
Type | Name | Description |
---|---|---|
IContentSecurityPolicyInlineExecutionFeature | cspFeature | The instance of IContentSecurityPolicyInlineExecutionFeature. |
System.String | elementContent | The content for which the hash is to be computed. |
ComputeAndAddStyleHash(IContentSecurityPolicyInlineExecutionFeature, String)
Computes the hash for given content by using current algorithm for styles and adds it to styles hashes collection.
Declaration
public static void ComputeAndAddStyleHash(this IContentSecurityPolicyInlineExecutionFeature cspFeature, string elementContent)
Parameters
Type | Name | Description |
---|---|---|
IContentSecurityPolicyInlineExecutionFeature | cspFeature | The instance of IContentSecurityPolicyInlineExecutionFeature. |
System.String | elementContent | The content for which the hash is to be computed. |
ComputeScriptHash(IContentSecurityPolicyInlineExecutionFeature, String)
Computes the hash for given content by using current algorithm for scripts.
Declaration
public static string ComputeScriptHash(this IContentSecurityPolicyInlineExecutionFeature cspFeature, string elementContent)
Parameters
Type | Name | Description |
---|---|---|
IContentSecurityPolicyInlineExecutionFeature | cspFeature | The instance of IContentSecurityPolicyInlineExecutionFeature. |
System.String | elementContent | The content for which the hash is to be computed. |
Returns
Type | Description |
---|---|
System.String | The hash. |
ComputeStyleHash(IContentSecurityPolicyInlineExecutionFeature, String)
Computes the hash for given content by using current algorithm for styles.
Declaration
public static string ComputeStyleHash(this IContentSecurityPolicyInlineExecutionFeature cspFeature, string elementContent)
Parameters
Type | Name | Description |
---|---|---|
IContentSecurityPolicyInlineExecutionFeature | cspFeature | The instance of IContentSecurityPolicyInlineExecutionFeature. |
System.String | elementContent | The content for which the hash is to be computed. |
Returns
Type | Description |
---|---|
System.String | The hash. |