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