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