34 references to EncryptionAlgorithm
Microsoft.AspNetCore.DataProtection (34)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (24)
108
internal static bool IsGcmAlgorithm(
EncryptionAlgorithm
algorithm)
110
return (
EncryptionAlgorithm
.AES_128_GCM <= algorithm && algorithm <=
EncryptionAlgorithm
.AES_256_GCM);
113
private static int GetAlgorithmKeySizeInBits(
EncryptionAlgorithm
algorithm)
117
case
EncryptionAlgorithm
.AES_128_CBC:
118
case
EncryptionAlgorithm
.AES_128_GCM:
121
case
EncryptionAlgorithm
.AES_192_CBC:
122
case
EncryptionAlgorithm
.AES_192_GCM:
125
case
EncryptionAlgorithm
.AES_256_CBC:
126
case
EncryptionAlgorithm
.AES_256_GCM:
134
private static string GetBCryptAlgorithmNameFromEncryptionAlgorithm(
EncryptionAlgorithm
algorithm)
138
case
EncryptionAlgorithm
.AES_128_CBC:
139
case
EncryptionAlgorithm
.AES_192_CBC:
140
case
EncryptionAlgorithm
.AES_256_CBC:
141
case
EncryptionAlgorithm
.AES_128_GCM:
142
case
EncryptionAlgorithm
.AES_192_GCM:
143
case
EncryptionAlgorithm
.AES_256_GCM:
167
private static Type GetManagedTypeFromEncryptionAlgorithm(
EncryptionAlgorithm
algorithm)
171
case
EncryptionAlgorithm
.AES_128_CBC:
172
case
EncryptionAlgorithm
.AES_192_CBC:
173
case
EncryptionAlgorithm
.AES_256_CBC:
174
case
EncryptionAlgorithm
.AES_128_GCM:
175
case
EncryptionAlgorithm
.AES_192_GCM:
176
case
EncryptionAlgorithm
.AES_256_GCM:
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (1)
106
throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(
EncryptionAlgorithm
));
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (1)
73
throw Error.Common_PropertyCannotBeNullOrEmpty(nameof(
EncryptionAlgorithm
));
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorConfiguration.cs (3)
18
/// The default value is <see cref="
EncryptionAlgorithm
.AES_256_CBC"/>.
20
public
EncryptionAlgorithm
EncryptionAlgorithm { get; set; } =
EncryptionAlgorithm
.AES_256_CBC;
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializer.cs (2)
34
configuration.EncryptionAlgorithm = (
EncryptionAlgorithm
)Enum.Parse(typeof(
EncryptionAlgorithm
), (string)encryptionElement.Attribute("algorithm")!);
DataProtectionBuilderExtensions.cs (3)
436
/// algorithms specified in the <see cref="
EncryptionAlgorithm
"/> and
458
/// algorithms specified in the <see cref="
EncryptionAlgorithm
"/> and
480
/// algorithms specified in the <see cref="
EncryptionAlgorithm
"/> and