1 implementation of ISecret
Microsoft.AspNetCore.DataProtection (1)
Secret.cs (1)
16
public sealed unsafe class Secret : IDisposable,
ISecret
39 references to ISecret
Microsoft.AspNetCore.DataProtection (24)
AuthenticatedEncryption\AuthenticatedEncryptorFactory.cs (1)
48
ISecret
secret,
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactory.cs (1)
50
ISecret
secret,
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactory.cs (1)
52
ISecret
secret,
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorConfiguration.cs (1)
38
IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(
ISecret
secret)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (2)
21
public AuthenticatedEncryptorDescriptor(AuthenticatedEncryptorConfiguration configuration,
ISecret
masterKey)
30
internal
ISecret
MasterKey { get; }
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorConfiguration.cs (1)
83
IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(
ISecret
secret)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (2)
23
public CngCbcAuthenticatedEncryptorDescriptor(CngCbcAuthenticatedEncryptorConfiguration configuration,
ISecret
masterKey)
32
internal
ISecret
MasterKey { get; }
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorConfiguration.cs (1)
59
IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(
ISecret
secret)
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptor.cs (2)
23
public CngGcmAuthenticatedEncryptorDescriptor(CngGcmAuthenticatedEncryptorConfiguration configuration,
ISecret
masterKey)
32
internal
ISecret
MasterKey { get; }
AuthenticatedEncryption\ConfigurationModel\IInternalAlgorithmConfiguration.cs (1)
20
IAuthenticatedEncryptorDescriptor CreateDescriptorFromSecret(
ISecret
secret);
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorConfiguration.cs (1)
62
IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(
ISecret
secret)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (2)
22
public ManagedAuthenticatedEncryptorDescriptor(ManagedAuthenticatedEncryptorConfiguration configuration,
ISecret
masterKey)
31
internal
ISecret
MasterKey { get; }
AuthenticatedEncryption\ConfigurationModel\SecretExtensions.cs (3)
12
/// Converts an <see cref="
ISecret
"/> to an <masterKey> element which is marked
17
public static XElement ToMasterKeyElement(this
ISecret
secret)
45
/// Converts a base64-encoded string into an <see cref="
ISecret
"/>.
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactory.cs (1)
43
ISecret
secret,
Cng\DpapiSecretSerializerHelper.cs (2)
43
public static byte[] ProtectWithDpapi(
ISecret
secret, bool protectToLocalMachine = false)
118
public static byte[] ProtectWithDpapiNG(
ISecret
secret, NCryptDescriptorHandle protectionDescriptorHandle)
Managed\AesGcmAuthenticatedEncryptor.cs (1)
46
public AesGcmAuthenticatedEncryptor(
ISecret
keyDerivationKey, int derivedKeySizeInBytes, IManagedGenRandom? genRandom = null)
Secret.cs (1)
68
public Secret(
ISecret
secret)
Microsoft.AspNetCore.DataProtection.Tests (15)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorTests.cs (1)
188
private static AuthenticatedEncryptorDescriptor CreateDescriptor(EncryptionAlgorithm encryptionAlgorithm, ValidationAlgorithm validationAlgorithm,
ISecret
masterKey)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorConfigurationTests.cs (2)
15
var
masterKey1 = ((CngCbcAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
16
var
masterKey2 = ((CngCbcAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorConfigurationTests.cs (2)
15
var
masterKey1 = ((CngGcmAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
16
var
masterKey2 = ((CngGcmAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorConfigurationTests.cs (2)
15
var
masterKey1 = ((ManagedAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
16
var
masterKey2 = ((ManagedAuthenticatedEncryptorDescriptor)configuration.CreateNewDescriptor()).MasterKey;
SecretAssert.cs (8)
12
/// Asserts that two <see cref="
ISecret
"/> instances contain the same material.
14
public static void Equal(
ISecret
secret1,
ISecret
secret2)
22
public static void LengthIs(int expectedLengthInBits,
ISecret
secret)
28
/// Asserts that two <see cref="
ISecret
"/> instances do not contain the same material.
30
public static void NotEqual(
ISecret
secret1,
ISecret
secret2)
35
private static string SecretToBase64String(
ISecret
secret)