| | | 99 | | /// - key number purpose set to 1 |
| | | 100 | | /// </summary> |
| | | 101 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API</param> |
-| | | 102 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction) |
-| | 12 | 103 | | : this(null, null, null, null, dataProtectionConfigureAction, 1) |
-| | | 104 | | { |
-| | 12 | 105 | | } |
-| | | 106 | | |
+| | | 102 | | /// <exception cref="ArgumentException">if either dataProtectionServiceProvider or dataProtectionConfigureAction |
+| | | 103 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction) |
+| | 24 | 104 | | : this(null, null, null, null, dataProtectionConfigureAction, 1) |
+| | | 105 | | { |
+| | 24 | 106 | | } |
| | | 107 | | |
| | | 108 | | |
-| | | 109 | | /// <summary> |
-| | | 110 | | /// Creates a DataProtection API configuration using the specified <see cref="dataProtectionConfigureAction"/> a |
-| | | 111 | | /// - default tokenization (e.g. <see cref="IProtectProviderConfigurationData.DefaultProtectRegexString"/>, <see |
-| | | 112 | | /// </summary> |
-| | | 113 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API</param> |
-| | | 114 | | /// <param name="keyNumber">a number specifying the index of the key to use</param> |
-| | | 115 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
-| | | 116 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
-| | | 117 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
-| | | 118 | | |
-| | | 119 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction, i |
-| | 0 | 120 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, null, dataProtectionConfigureAction |
-| | | 121 | | { |
-| | 0 | 122 | | } |
-| | | 123 | | |
+| | | 109 | | |
+| | | 110 | | /// <summary> |
+| | | 111 | | /// Creates a DataProtection API configuration using the specified <see cref="dataProtectionConfigureAction"/> a |
+| | | 112 | | /// - default tokenization (e.g. <see cref="IProtectProviderConfigurationData.DefaultProtectRegexString"/>, <see |
+| | | 113 | | /// </summary> |
+| | | 114 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API</param> |
+| | | 115 | | /// <param name="keyNumber">a number specifying the index of the key to use</param> |
+| | | 116 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
+| | | 117 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
+| | | 118 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
+| | | 119 | | /// <exception cref="ArgumentException">if either dataProtectionServiceProvider or dataProtectionConfigureAction |
+| | | 120 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction, i |
+| | 0 | 121 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, null, dataProtectionConfigureAction |
+| | | 122 | | { |
+| | 0 | 123 | | } |
| | | 124 | | |
| | | 125 | | |
-| | | 126 | | /// <summary> |
-| | | 127 | | /// Creates a DataProtection API configuration using the specified <see cref="dataProtectionServiceProvider"/> a |
-| | | 128 | | /// - default tokenization (e.g. <see cref="IProtectProviderConfigurationData.DefaultProtectRegexString"/>, <see |
-| | | 129 | | /// </summary> |
-| | | 130 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API</param> |
-| | | 131 | | /// <param name="purposeString">a string used to derive the encryption key</param> |
-| | | 132 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
-| | | 133 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
-| | | 134 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
-| | | 135 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction, S |
-| | 0 | 136 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, null, dataProtectionConfigureAction |
-| | | 137 | | { |
-| | 0 | 138 | | } |
-| | | 139 | | |
-| | | 140 | | |
+| | | 126 | | |
+| | | 127 | | /// <summary> |
+| | | 128 | | /// Creates a DataProtection API configuration using the specified <see cref="dataProtectionServiceProvider"/> a |
+| | | 129 | | /// - default tokenization (e.g. <see cref="IProtectProviderConfigurationData.DefaultProtectRegexString"/>, <see |
+| | | 130 | | /// </summary> |
+| | | 131 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API</param> |
+| | | 132 | | /// <param name="purposeString">a string used to derive the encryption key</param> |
+| | | 133 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
+| | | 134 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
+| | | 135 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
+| | | 136 | | /// <exception cref="ArgumentException">if either dataProtectionServiceProvider or dataProtectionConfigureAction |
+| | | 137 | | public DataProtectionAPIProtectConfigurationData(Action<IDataProtectionBuilder> dataProtectionConfigureAction, S |
+| | 0 | 138 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, null, dataProtectionConfigureAction |
+| | | 139 | | { |
+| | 0 | 140 | | } |
| | | 141 | | |
| | | 142 | | |
-| | | 143 | | /// <summary> |
-| | | 144 | | /// Main constructor for DataProtectionAPIProtectConfigurationData using a key number |
-| | | 145 | | /// </summary> |
-| | | 146 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
-| | | 147 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
-| | | 148 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
-| | | 149 | | /// <param name="dataProtectionServiceProvider">a service provider configured with Data Protection API, this par |
-| | | 150 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API, this parame |
-| | | 151 | | /// <param name="keyNumber">a number specifying the index of the key to use</param> |
-| | | 152 | | /// <exception cref="ArgumentException">if dataProtectionServiceProvider or dataProtectionServiceProvider is nul |
-| | | 153 | | public DataProtectionAPIProtectConfigurationData(String protectRegexString = null, String protectedRegexString = |
-| | 12 | 154 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, dataProtectionServiceProvider, data |
-| | | 155 | | { |
-| | | 156 | | |
-| | 12 | 157 | | } |
+| | | 143 | | |
+| | | 144 | | |
+| | | 145 | | /// <summary> |
+| | | 146 | | /// Main constructor for DataProtectionAPIProtectConfigurationData using a key number |
+| | | 147 | | /// </summary> |
+| | | 148 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
+| | | 149 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
+| | | 150 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
+| | | 151 | | /// <param name="dataProtectionServiceProvider">a service provider configured with Data Protection API, this par |
+| | | 152 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API, this parame |
+| | | 153 | | /// <param name="keyNumber">a number specifying the index of the key to use</param> |
+| | | 154 | | /// <exception cref="ArgumentException">if either dataProtectionServiceProvider or dataProtectionConfigureAction |
+| | | 155 | | public DataProtectionAPIProtectConfigurationData(String protectRegexString = null, String protectedRegexString = |
+| | 24 | 156 | | : this(protectRegexString, protectedRegexString, protectedReplaceString, dataProtectionServiceProvider, data |
+| | | 157 | | { |
| | | 158 | | |
-| | | 159 | | |
+| | 24 | 159 | | } |
| | | 160 | | |
-| | | 161 | | /// <summary> |
-| | | 162 | | /// Main constructor for DataProtectionAPIProtectConfigurationData using a purpose string |
-| | | 163 | | /// </summary> |
-| | | 164 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
-| | | 165 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
-| | | 166 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
-| | | 167 | | /// <param name="dataProtectionServiceProvider">a service provider configured with Data Protection API, this par |
-| | | 168 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API, this parame |
-| | | 169 | | /// <param name="purposeString">a string used to derive the encryption key</param> |
-| | | 170 | | /// <exception cref="ArgumentException">if dataProtectionServiceProvider or dataProtectionServiceProvider is nul |
-| | 12 | 171 | | public DataProtectionAPIProtectConfigurationData(String protectRegexString = null, String protectedRegexString = |
-| | | 172 | | { |
-| | | 173 | | // check that at least one parameter is not null |
-| | 12 | 174 | | if (dataProtectionServiceProvider == null && dataProtectionConfigureAction == null) |
-| | 0 | 175 | | throw new ArgumentException("Either dataProtectionServiceProvider or dataProtectionConfigureAction must |
-| | | 176 | | |
-| | | 177 | | // if dataProtectionServiceProvider is null and we pass a dataProtectionConfigureAction configure a new serv |
-| | 12 | 178 | | if (dataProtectionServiceProvider == null && dataProtectionConfigureAction != null) |
-| | | 179 | | { |
-| | 12 | 180 | | var services = new ServiceCollection(); |
-| | 12 | 181 | | dataProtectionConfigureAction(services.AddDataProtection()); |
-| | 12 | 182 | | dataProtectionServiceProvider = services.BuildServiceProvider(); |
-| | | 183 | | } |
-| | | 184 | | |
-| | | 185 | | // check that dataProtectionServiceProvider resolves the IDataProtector |
-| | 12 | 186 | | var dataProtect = dataProtectionServiceProvider.GetRequiredService<IDataProtectionProvider>().CreateProtecto |
-| | 12 | 187 | | if (dataProtect == null) |
-| | 0 | 188 | | throw new ArgumentException("Either dataProtectionServiceProvider or dataProtectionConfigureAction must |
-| | | 189 | | |
-| | | 190 | | // sets the abstract class base properties and calls CheckConfigurationIsValid |
-| | 12 | 191 | | if (!String.IsNullOrEmpty(protectRegexString)) |
-| | 0 | 192 | | ProtectRegex = new Regex(protectRegexString); |
-| | | 193 | | |
-| | 12 | 194 | | if (!String.IsNullOrEmpty(protectedRegexString)) |
-| | 0 | 195 | | ProtectedRegex = new Regex(protectedRegexString); |
-| | | 196 | | |
-| | 12 | 197 | | ProtectedReplaceString = protectedReplaceString; |
+| | | 161 | | |
+| | | 162 | | |
+| | | 163 | | /// <summary> |
+| | | 164 | | /// Main constructor for DataProtectionAPIProtectConfigurationData using a purpose string |
+| | | 165 | | /// </summary> |
+| | | 166 | | /// <param name="protectRegexString">a regular expression which captures the data to be encrypted in a named gro |
+| | | 167 | | /// <param name="protectedRegexString">a regular expression which captures the data to be decrypted in a named g |
+| | | 168 | | /// <param name="protectedReplaceString">a string replacement expression which captures the substitution which m |
+| | | 169 | | /// <param name="dataProtectionServiceProvider">a service provider configured with Data Protection API, this par |
+| | | 170 | | /// <param name="dataProtectionConfigureAction">a configure action to setup the Data Protection API, this parame |
+| | | 171 | | /// <param name="purposeString">a string used to derive the encryption key</param> |
+| | | 172 | | /// <exception cref="ArgumentException">if either dataProtectionServiceProvider or dataProtectionConfigureAction |
+| | 24 | 173 | | public DataProtectionAPIProtectConfigurationData(String protectRegexString = null, String protectedRegexString = |
+| | | 174 | | { |
+| | | 175 | | // check that at least one parameter is not null |
+| | 24 | 176 | | if (dataProtectionServiceProvider == null && dataProtectionConfigureAction == null) |
+| | 0 | 177 | | throw new ArgumentException("Either dataProtectionServiceProvider or dataProtectionConfigureAction must |
+| | | 178 | | |
+| | | 179 | | // if dataProtectionServiceProvider is null and we pass a dataProtectionConfigureAction configure a new serv |
+| | 24 | 180 | | if (dataProtectionServiceProvider == null && dataProtectionConfigureAction != null) |
+| | | 181 | | { |
+| | 24 | 182 | | var services = new ServiceCollection(); |
+| | 24 | 183 | | dataProtectionConfigureAction(services.AddDataProtection()); |
+| | 24 | 184 | | dataProtectionServiceProvider = services.BuildServiceProvider(); |
+| | | 185 | | } |
+| | | 186 | | |
+| | | 187 | | // check that dataProtectionServiceProvider resolves the IDataProtector |
+| | 24 | 188 | | var dataProtect = dataProtectionServiceProvider.GetRequiredService<IDataProtectionProvider>().CreateProtecto |
+| | 24 | 189 | | if (dataProtect == null) |
+| | 0 | 190 | | throw new ArgumentException("Either dataProtectionServiceProvider or dataProtectionConfigureAction must |
+| | | 191 | | |
+| | | 192 | | // sets the abstract class base properties and calls CheckConfigurationIsValid |
+| | 24 | 193 | | if (!String.IsNullOrEmpty(protectRegexString)) |
+| | 0 | 194 | | ProtectRegex = new Regex(protectRegexString); |
+| | | 195 | | |
+| | 24 | 196 | | if (!String.IsNullOrEmpty(protectedRegexString)) |
+| | 0 | 197 | | ProtectedRegex = new Regex(protectedRegexString); |
| | | 198 | | |
-| | 12 | 199 | | ProtectProvider = new DataProtectionAPIProtectProvider(dataProtect); |
+| | 24 | 199 | | ProtectedReplaceString = protectedReplaceString; |
| | | 200 | | |
-| | 12 | 201 | | CheckConfigurationIsValid(); |
-| | 12 | 202 | | } |
-| | | 203 | | } |
-| | | 204 | | |
-| | | 205 | | } |
+| | 24 | 201 | | ProtectProvider = new DataProtectionAPIProtectProvider(dataProtect); |
+| | | 202 | | |
+| | 24 | 203 | | CheckConfigurationIsValid(); |
+| | 24 | 204 | | } |
+| | | 205 | | } |
+| | | 206 | | } |
-
+
Methods/Properties
-
DataProtectionAPIProtectConfigurationKeyNumberPurpose(System.Int32)
-
DataProtectionAPIProtectConfigurationStringPurpose(System.String)
-
DataProtectionAPIProtectConfigurationKeyNumberToString(System.Int32)
-
.ctor(System.IServiceProvider)
-
.ctor(System.IServiceProvider,System.Int32,System.String,System.String,System.String)
+
DataProtectionAPIProtectConfigurationKeyNumberPurpose(System.Int32)
+
DataProtectionAPIProtectConfigurationStringPurpose(System.String)
+
DataProtectionAPIProtectConfigurationKeyNumberToString(System.Int32)
+
.ctor(System.IServiceProvider)
+
.ctor(System.IServiceProvider,System.Int32,System.String,System.String,System.String)
.ctor(System.IServiceProvider,System.String,System.String,System.String,System.String)
-
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>)
-
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.Int32,System.String,System.String,System.String)
-
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.String,System.String,System.String,System.String)
-
.ctor(System.String,System.String,System.String,System.IServiceProvider,System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.Int32)
-
.ctor(System.String,System.String,System.String,System.IServiceProvider,System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.String)
+
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>)
+
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.Int32,System.String,System.String,System.String)
+
.ctor(System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.String,System.String,System.String,System.String)
+
.ctor(System.String,System.String,System.String,System.IServiceProvider,System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.Int32)
+
.ctor(System.String,System.String,System.String,System.IServiceProvider,System.Action`1<Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder>,System.String)
+