19 references to HMACSHA256
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (2)
155
case ValidationAlgorithm.
HMACSHA256
:
189
case ValidationAlgorithm.
HMACSHA256
:
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorConfiguration.cs (2)
26
/// The default value is <see cref="ValidationAlgorithm.
HMACSHA256
"/>.
29
public ValidationAlgorithm ValidationAlgorithm { get; set; } = ValidationAlgorithm.
HMACSHA256
;
Microsoft.AspNetCore.DataProtection.Tests (15)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorTests.cs (8)
23
[InlineData(EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
)]
24
[InlineData(EncryptionAlgorithm.AES_192_CBC, ValidationAlgorithm.
HMACSHA256
)]
25
[InlineData(EncryptionAlgorithm.AES_256_CBC, ValidationAlgorithm.
HMACSHA256
)]
68
var test = CreateEncryptorInstanceFromDescriptor(CreateDescriptor(encryptionAlgorithm, ValidationAlgorithm.
HMACSHA256
/* unused */, masterKey));
94
var test = CreateEncryptorInstanceFromDescriptor(CreateDescriptor(encryptionAlgorithm, ValidationAlgorithm.
HMACSHA256
/* unused */, masterKey));
107
{ EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
, () => new HMACSHA256() },
108
{ EncryptionAlgorithm.AES_192_CBC, ValidationAlgorithm.
HMACSHA256
, () => new HMACSHA256() },
109
{ EncryptionAlgorithm.AES_256_CBC, ValidationAlgorithm.
HMACSHA256
, () => new HMACSHA256() },
KeyManagement\KeyRingBasedDataProtectorTests.cs (7)
629
[InlineData("", EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
)]
630
[InlineData("small", EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
)]
631
[InlineData("This is a medium length plaintext message", EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
)]
632
[InlineData("This is a very long plaintext message that spans multiple blocks and should test the encryption and size estimation with larger payloads to ensure everything works correctly", EncryptionAlgorithm.AES_128_CBC, ValidationAlgorithm.
HMACSHA256
)]
633
[InlineData("small", EncryptionAlgorithm.AES_256_CBC, ValidationAlgorithm.
HMACSHA256
)]
635
[InlineData("small", EncryptionAlgorithm.AES_128_GCM, ValidationAlgorithm.
HMACSHA256
)]
636
[InlineData("This is a medium length plaintext message", EncryptionAlgorithm.AES_256_GCM, ValidationAlgorithm.
HMACSHA256
)]