7 writes to HashAlgorithm
Microsoft.AspNetCore.DataProtection (3)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (1)
88HashAlgorithm = GetBCryptAlgorithmNameFromValidationAlgorithm(authenticatedConfiguration.ValidationAlgorithm)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializer.cs (1)
41configuration.HashAlgorithm = (string)hashElement.Attribute("algorithm")!;
RegistryPolicyResolver.cs (1)
138options.HashAlgorithm = Convert.ToString(valueFromRegistry, CultureInfo.InvariantCulture)!;
Microsoft.AspNetCore.DataProtection.Tests (4)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
28HashAlgorithm = Constants.BCRYPT_SHA512_ALGORITHM,
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorTests.cs (2)
20HashAlgorithm = "hash-alg", 49HashAlgorithm = "hash-alg"
RegistryPolicyResolverTests.cs (1)
130HashAlgorithm = "hash-alg",
13 references to HashAlgorithm
Microsoft.AspNetCore.DataProtection (9)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (7)
70if (String.IsNullOrEmpty(configuration.HashAlgorithm)) 72throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(configuration.HashAlgorithm)); 75_logger.OpeningCNGAlgorithmFromProviderWithHMAC(configuration.HashAlgorithm, configuration.HashAlgorithmProvider); 81if (configuration.HashAlgorithm == Constants.BCRYPT_SHA1_ALGORITHM) { algorithmHandle = CachedAlgorithmHandles.HMAC_SHA1; } 82else if (configuration.HashAlgorithm == Constants.BCRYPT_SHA256_ALGORITHM) { algorithmHandle = CachedAlgorithmHandles.HMAC_SHA256; } 83else if (configuration.HashAlgorithm == Constants.BCRYPT_SHA512_ALGORITHM) { algorithmHandle = CachedAlgorithmHandles.HMAC_SHA512; } 89algorithmHandle = BCryptAlgorithmHandle.OpenAlgorithmHandle(configuration.HashAlgorithm, configuration.HashAlgorithmProvider, hmac: true);
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (1)
55new XAttribute("algorithm", Configuration.HashAlgorithm));
RegistryPolicyResolver.cs (1)
135valueFromRegistry = key.GetValue(nameof(CngCbcAuthenticatedEncryptorConfiguration.HashAlgorithm));
Microsoft.AspNetCore.DataProtection.Tests (4)
RegistryPolicyResolverTests.cs (4)
107Assert.Equal(expectedConfiguration.HashAlgorithm, actualConfiguration.HashAlgorithm); 143Assert.Equal(expectedConfiguration.HashAlgorithm, actualConfiguration.HashAlgorithm);