Make some pubternal types in data protection (#12121)

- Make CngAuthenticatedEncryptorBase internal
- Left IActivator public because they are used in constructors the XmlKeyManager ctor
This commit is contained in:
David Fowler 2019-07-12 22:29:54 -07:00 committed by GitHub
parent 32782cb421
commit 87a92e52c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 21 deletions

View File

@ -217,26 +217,8 @@ namespace Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.Configurat
public System.Xml.Linq.XElement SerializedDescriptorElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } public System.Xml.Linq.XElement SerializedDescriptorElement { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
} }
} }
namespace Microsoft.AspNetCore.DataProtection.Cng.Internal
{
public abstract partial class CngAuthenticatedEncryptorBase : Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.IAuthenticatedEncryptor, System.IDisposable
{
protected CngAuthenticatedEncryptorBase() { }
public byte[] Decrypt(System.ArraySegment<byte> ciphertext, System.ArraySegment<byte> additionalAuthenticatedData) { throw null; }
protected unsafe abstract byte[] DecryptImpl(byte* pbCiphertext, uint cbCiphertext, byte* pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData);
public abstract void Dispose();
public byte[] Encrypt(System.ArraySegment<byte> plaintext, System.ArraySegment<byte> additionalAuthenticatedData) { throw null; }
public byte[] Encrypt(System.ArraySegment<byte> plaintext, System.ArraySegment<byte> additionalAuthenticatedData, uint preBufferSize, uint postBufferSize) { throw null; }
protected unsafe abstract byte[] EncryptImpl(byte* pbPlaintext, uint cbPlaintext, byte* pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData, uint cbPreBuffer, uint cbPostBuffer);
}
}
namespace Microsoft.AspNetCore.DataProtection.Internal namespace Microsoft.AspNetCore.DataProtection.Internal
{ {
public partial class DataProtectionBuilder : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
{
public DataProtectionBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection services) { }
public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
}
public partial interface IActivator public partial interface IActivator
{ {
object CreateInstance(System.Type expectedBaseType, string implementationTypeName); object CreateInstance(System.Type expectedBaseType, string implementationTypeName);

View File

@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.DataProtection.Cng.Internal
/// <summary> /// <summary>
/// Base class used for all CNG-related authentication encryption operations. /// Base class used for all CNG-related authentication encryption operations.
/// </summary> /// </summary>
public unsafe abstract class CngAuthenticatedEncryptorBase : IOptimizedAuthenticatedEncryptor, IDisposable internal unsafe abstract class CngAuthenticatedEncryptorBase : IOptimizedAuthenticatedEncryptor, IDisposable
{ {
public byte[] Decrypt(ArraySegment<byte> ciphertext, ArraySegment<byte> additionalAuthenticatedData) public byte[] Decrypt(ArraySegment<byte> ciphertext, ArraySegment<byte> additionalAuthenticatedData)
{ {

View File

@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.DataProtection.Internal
/// <summary> /// <summary>
/// Default implementation of <see cref="IDataProtectionBuilder"/>. /// Default implementation of <see cref="IDataProtectionBuilder"/>.
/// </summary> /// </summary>
public class DataProtectionBuilder : IDataProtectionBuilder internal class DataProtectionBuilder : IDataProtectionBuilder
{ {
/// <summary> /// <summary>
/// Creates a new configuration object linked to a <see cref="IServiceCollection"/>. /// Creates a new configuration object linked to a <see cref="IServiceCollection"/>.

View File

@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.DataProtection.Cng.Internal
Assert.Equal(new byte[] { 0x20, 0x21, 0x22 }, retVal); Assert.Equal(new byte[] { 0x20, 0x21, 0x22 }, retVal);
} }
public abstract class MockableEncryptor : CngAuthenticatedEncryptorBase internal abstract class MockableEncryptor : CngAuthenticatedEncryptorBase
{ {
public override void Dispose() public override void Dispose()
{ {