8 writes to ValidationAlgorithmType
Microsoft.AspNetCore.DataProtection (3)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (1)
100
ValidationAlgorithmType
= GetManagedTypeFromValidationAlgorithm(authenticatedConfiguration.ValidationAlgorithm)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializer.cs (1)
39
configuration.
ValidationAlgorithmType
= ManagedAlgorithmHelpers.FriendlyNameToType((string)validationElement.Attribute("algorithm")!);
RegistryPolicyResolver.cs (1)
192
options.
ValidationAlgorithmType
= ManagedAlgorithmHelpers.FriendlyNameToType(Convert.ToString(valueFromRegistry, CultureInfo.InvariantCulture)!);
Microsoft.AspNetCore.DataProtection.Tests (5)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (2)
30
ValidationAlgorithmType
= validationAlgorithmType
64
ValidationAlgorithmType
= typeof(HMACSHA384)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorTests.cs (2)
22
ValidationAlgorithmType
= typeof(MyKeyedHashAlgorithm)
54
ValidationAlgorithmType
= validationAlgorithmType
RegistryPolicyResolverTests.cs (1)
241
ValidationAlgorithmType
= typeof(HMACSHA1)
13 references to ValidationAlgorithmType
Microsoft.AspNetCore.DataProtection (9)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (1)
50
new XAttribute("algorithm", ManagedAlgorithmHelpers.TypeToFriendlyName(Configuration.
ValidationAlgorithmType
)));
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (7)
61
if (configuration.
ValidationAlgorithmType
== null)
63
throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(configuration.
ValidationAlgorithmType
));
66
typeof(KeyedHashAlgorithm).AssertIsAssignableFrom(configuration.
ValidationAlgorithmType
);
67
_logger.UsingManagedKeyedHashAlgorithm(configuration.
ValidationAlgorithmType
.FullName!);
68
if (configuration.
ValidationAlgorithmType
== typeof(HMACSHA256))
72
else if (configuration.
ValidationAlgorithmType
== typeof(HMACSHA512))
78
return AlgorithmActivator.CreateFactory<KeyedHashAlgorithm>(configuration.
ValidationAlgorithmType
);
RegistryPolicyResolver.cs (1)
189
valueFromRegistry = key.GetValue(nameof(ManagedAuthenticatedEncryptorConfiguration.
ValidationAlgorithmType
));
Microsoft.AspNetCore.DataProtection.Tests (4)
RegistryPolicyResolverTests.cs (4)
222
Assert.Equal(expectedConfiguration.
ValidationAlgorithmType
, actualConfiguration.
ValidationAlgorithmType
);
252
Assert.Equal(expectedConfiguration.
ValidationAlgorithmType
, actualConfiguration.
ValidationAlgorithmType
);