Rename to Microsoft.AspNet.DataProtection

from Microsoft.AspNet.Security.DataProtection
This commit is contained in:
Levi B 2015-02-25 16:41:17 -08:00
parent 544c83812c
commit e2ca9fc652
118 changed files with 174 additions and 172 deletions

View File

@ -5,15 +5,15 @@ VisualStudioVersion = 14.0.22609.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5FCB2DA3-5395-47F5-BCEE-E0EA319448EA}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Security.DataProtection", "src\Microsoft.AspNet.Security.DataProtection\Microsoft.AspNet.Security.DataProtection.kproj", "{1E570CD4-6F12-44F4-961E-005EE2002BC2}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.DataProtection", "src\Microsoft.AspNet.DataProtection\Microsoft.AspNet.DataProtection.kproj", "{1E570CD4-6F12-44F4-961E-005EE2002BC2}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Security.DataProtection.Azure", "src\Microsoft.AspNet.Security.DataProtection.Azure\Microsoft.AspNet.Security.DataProtection.Azure.kproj", "{DF3671D7-A9B1-45F1-A195-0AD596001735}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.DataProtection.Azure", "src\Microsoft.AspNet.DataProtection.Azure\Microsoft.AspNet.DataProtection.Azure.kproj", "{DF3671D7-A9B1-45F1-A195-0AD596001735}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Security.DataProtection.Compatibility", "src\Microsoft.AspNet.Security.DataProtection.Compatibility\Microsoft.AspNet.Security.DataProtection.Compatibility.kproj", "{C2FD9D02-AA0E-45FA-8561-EE357A94B73D}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.DataProtection.Compatibility", "src\Microsoft.AspNet.DataProtection.Compatibility\Microsoft.AspNet.DataProtection.Compatibility.kproj", "{C2FD9D02-AA0E-45FA-8561-EE357A94B73D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{60336AB3-948D-4D15-A5FB-F32A2B91E814}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Security.DataProtection.Test", "test\Microsoft.AspNet.Security.DataProtection.Test\Microsoft.AspNet.Security.DataProtection.Test.kproj", "{7A637185-2BA1-437D-9D4C-7CC4F94CF7BF}"
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.DataProtection.Test", "test\Microsoft.AspNet.DataProtection.Test\Microsoft.AspNet.DataProtection.Test.kproj", "{7A637185-2BA1-437D-9D4C-7CC4F94CF7BF}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Cryptography.Internal", "src\Microsoft.AspNet.Cryptography.Internal\Microsoft.AspNet.Cryptography.Internal.kproj", "{E2779976-A28C-4365-A4BB-4AD854FAF23E}"
EndProject

View File

@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("Microsoft.AspNet.Cryptography.Internal.Test")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.Cryptography.KeyDerivation")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.Cryptography.KeyDerivation.Test")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.Security.DataProtection")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.Security.DataProtection.Test")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.DataProtection")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.DataProtection.Test")]

View File

@ -8,12 +8,12 @@ using System.Linq;
using System.Net;
using System.Runtime.ExceptionServices;
using System.Xml.Linq;
using Microsoft.AspNet.Security.DataProtection.Repositories;
using Microsoft.AspNet.DataProtection.Repositories;
using Microsoft.Framework.OptionsModel;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
namespace Microsoft.AspNet.Security.DataProtection.Azure
namespace Microsoft.AspNet.DataProtection.Azure
{
/// <summary>
/// An XML repository backed by Azure blob storage.

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.WindowsAzure.Storage.Blob;
namespace Microsoft.AspNet.Security.DataProtection.Azure
namespace Microsoft.AspNet.DataProtection.Azure
{
/// <summary>
/// Specifies options for configuring an Azure blob storage-based repository.

View File

@ -6,7 +6,7 @@ using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal static class CryptoUtil
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection.Azure
{
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
internal sealed class NotNullAttribute : Attribute

View File

@ -2,7 +2,7 @@
"version": "1.0.0-*",
"description": "ASP.NET 5 blob storage repository for DataProtection.",
"dependencies": {
"Microsoft.AspNet.Security.DataProtection": "1.0.0-*",
"Microsoft.AspNet.DataProtection": "1.0.0-*",
"WindowsAzure.Storage": "4.3.0"
},
"frameworks": {

View File

@ -5,7 +5,7 @@ using System;
using System.Diagnostics;
using System.Threading;
namespace Microsoft.AspNet.Security.DataProtection.Compatibility
namespace Microsoft.AspNet.DataProtection.Compatibility
{
internal sealed class DataProtectionProviderHelper
{

View File

@ -5,7 +5,7 @@ using System;
using System.Diagnostics;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Compatibility
namespace Microsoft.AspNet.DataProtection.Compatibility
{
public sealed class DataProtector<T> : DataProtector, IFactorySupportFunctions
where T : class, IDataProtectionProviderFactory, new()

View File

@ -5,7 +5,7 @@ using System;
using System.Diagnostics;
using System.Threading;
namespace Microsoft.AspNet.Security.DataProtection.Compatibility
namespace Microsoft.AspNet.DataProtection.Compatibility
{
internal sealed class DataProtectorHelper
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.Compatibility
namespace Microsoft.AspNet.DataProtection.Compatibility
{
public interface IDataProtectionProviderFactory
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.Compatibility
namespace Microsoft.AspNet.DataProtection.Compatibility
{
internal interface IFactorySupportFunctions
{

View File

@ -4,7 +4,7 @@
"frameworks": {
"net451": {
"dependencies": {
"Microsoft.AspNet.Security.DataProtection": "1.0.0-*"
"Microsoft.AspNet.DataProtection": "1.0.0-*"
},
"frameworkAssemblies": {
"System.Security": "4.0.0.0"

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal static class ArraySegmentExtensions
{

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal static class AuthenticatedEncryptorExtensions
{

View File

@ -4,9 +4,9 @@
using System;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class CngCbcAuthenticatedEncryptorConfiguration : IAuthenticatedEncryptorConfiguration
{

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// A factory that is able to create a CNG-based IAuthenticatedEncryptor

View File

@ -5,9 +5,9 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Options for configuring an authenticated encryption mechanism which uses

View File

@ -5,10 +5,10 @@ using System;
using System.Linq;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class CngCbcAuthenticatedEncryptorConfigurationXmlReader : IAuthenticatedEncryptorConfigurationXmlReader
{

View File

@ -4,9 +4,9 @@
using System;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class CngGcmAuthenticatedEncryptorConfiguration : IAuthenticatedEncryptorConfiguration
{

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// A factory that is able to create a CNG-based IAuthenticatedEncryptor

View File

@ -5,9 +5,9 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Options for configuring an authenticated encryption mechanism which uses

View File

@ -5,10 +5,10 @@ using System;
using System.Linq;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class CngGcmAuthenticatedEncryptorConfigurationXmlReader : IAuthenticatedEncryptorConfigurationXmlReader
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// The basic interface for providing an authenticated encryption and decryption routine.

View File

@ -3,9 +3,9 @@
using System;
using System.Xml.Linq;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Represents a type that contains configuration information about an IAuthenticatedEncryptor

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Represents a type that can create new authenticated encryption configuration objects.

View File

@ -4,7 +4,7 @@
using System;
using System.Xml.Linq;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Represents a type that can deserialize an XML-serialized IAuthenticatedEncryptorConfiguration.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal interface IInternalConfigurationOptions
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// An optimized encryptor that can avoid buffer allocations in common code paths.

View File

@ -4,9 +4,9 @@
using System;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class ManagedAuthenticatedEncryptorConfiguration : IAuthenticatedEncryptorConfiguration
{

View File

@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.Managed;
using Microsoft.AspNet.DataProtection.Managed;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
public sealed class ManagedAuthenticatedEncryptorConfigurationFactory : IAuthenticatedEncryptorConfigurationFactory
{

View File

@ -5,9 +5,9 @@ using System;
using System.Reflection;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.Managed;
using Microsoft.AspNet.DataProtection.Managed;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
/// <summary>
/// Options for configuring an authenticated encryption mechanism which uses

View File

@ -5,10 +5,10 @@ using System;
using System.Linq;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.XmlEncryption;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption
namespace Microsoft.AspNet.DataProtection.AuthenticatedEncryption
{
internal sealed class ManagedAuthenticatedEncryptorConfigurationXmlReader : IAuthenticatedEncryptorConfigurationXmlReader
{

View File

@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal unsafe static class BitHelpers
{

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.AspNet.Cryptography.Cng;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
internal unsafe sealed class BCryptGenRandomImpl : IBCryptGenRandom
{

View File

@ -5,9 +5,9 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.SP800_108;
using Microsoft.AspNet.DataProtection.SP800_108;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
// An encryptor which does Encrypt(CBC) + HMAC using the Windows CNG (BCrypt*) APIs.
// The payloads produced by this encryptor should be compatible with the payloads

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
/// <summary>
/// Base class used for all CNG-related authentication encryption operations.

View File

@ -10,7 +10,7 @@ using System.Text;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.SafeHandles;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
internal unsafe static class DpapiSecretSerializerHelper
{

View File

@ -5,9 +5,9 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.SP800_108;
using Microsoft.AspNet.DataProtection.SP800_108;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
// GCM is defined in NIST SP 800-38D (http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf).
// Heed closely the uniqueness requirements called out in Sec. 8: the probability that the GCM encryption

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.Cng
namespace Microsoft.AspNet.DataProtection.Cng
{
internal unsafe interface IBCryptGenRandom
{

View File

@ -5,7 +5,7 @@ using System;
using System.Diagnostics;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// Helpful extension methods for data protection APIs.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
public class DataProtectionOptions
{

View File

@ -6,12 +6,12 @@ using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Security.DataProtection;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.Security.DataProtection.Dpapi;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.AspNet.Security.DataProtection.Repositories;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.Dpapi;
using Microsoft.AspNet.DataProtection.KeyManagement;
using Microsoft.AspNet.DataProtection.Repositories;
using Microsoft.AspNet.DataProtection.XmlEncryption;
using Microsoft.Framework.ConfigurationModel;
namespace Microsoft.Framework.DependencyInjection

View File

@ -2,12 +2,12 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.AspNet.DataProtection.KeyManagement;
using Microsoft.Framework.DependencyInjection;
using Microsoft.Framework.DependencyInjection.Fallback;
using Microsoft.Framework.OptionsModel;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
public class DefaultDataProtectionProvider : IDataProtectionProvider
{

View File

@ -4,7 +4,7 @@
using System;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Dpapi
namespace Microsoft.AspNet.DataProtection.Dpapi
{
// Provides a temporary implementation of IDataProtectionProvider for non-Windows machines
// or for Windows machines where we can't depend on the user profile.

View File

@ -6,7 +6,7 @@ using System.IO;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Dpapi
namespace Microsoft.AspNet.DataProtection.Dpapi
{
// Provides a temporary implementation of IDataProtector for non-Windows machines
// or for Windows machines where we can't depend on the user profile.

View File

@ -4,7 +4,7 @@
using System;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Dpapi
namespace Microsoft.AspNet.DataProtection.Dpapi
{
internal interface IProtectedData
{

View File

@ -3,9 +3,9 @@
using System;
using System.Security.Cryptography;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.Dpapi
namespace Microsoft.AspNet.DataProtection.Dpapi
{
internal unsafe sealed class ProtectedDataImpl : IProtectedData
{

View File

@ -4,7 +4,7 @@
using System;
using System.Text;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal unsafe static class EncodingUtil
{

View File

@ -3,11 +3,11 @@
using System;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.KeyManagement;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// An IDataProtectionProvider that is transient.

View File

@ -5,7 +5,7 @@ using System;
using System.Globalization;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal static class Error
{

View File

@ -4,7 +4,7 @@
using System;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal static class ExceptionExtensions
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// An interface that can be used to create IDataProtector instances.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// An interface that can provide data protection services.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// Represents a secret value.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// An interface that can provide data protection services.

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
/// <summary>
/// The basic interface for representing an authenticated encryption key.

View File

@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
/// <summary>
/// The basic interface for performing key management operations.

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal interface IKeyRing
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal interface IKeyRingProvider
{

View File

@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal sealed class Key : IKey
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal static class KeyExtensions
{

View File

@ -4,9 +4,9 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal sealed class KeyRing : IKeyRing
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal unsafe sealed class KeyRingBasedDataProtectionProvider : IDataProtectionProvider
{

View File

@ -6,16 +6,18 @@ using System.Diagnostics;
using System.IO;
using System.Threading;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal unsafe sealed class KeyRingBasedDataProtector : IDataProtector
{
// This magic header identifies a v0 protected data blob.
// It's the high 28 bits of the SHA1 hash of "Microsoft.AspNet.Security.DataProtection.MultiplexingDataProtector" [US-ASCII].
// The last 4 bits are reserved for version information.
private const uint MAGIC_HEADER_V0 = 0xE123CF30;
// It's the high 28 bits of the SHA1 hash of "Microsoft.AspNet.DataProtection.MultiplexingDataProtector" [US-ASCII].
// The last nibble reserved for version information.
// There's also the nice property that "F0 C9" can never appear in a well-formed UTF8 sequence, so attempts to
// treat a protected payload as a UTF8-encoded string will fail, and devs can catch the mistake early.
private const uint MAGIC_HEADER_V0 = 0x09F0C9F0;
private byte[] _additionalAuthenticatedDataTemplate;
private readonly IKeyRingProvider _keyringProvider;

View File

@ -7,7 +7,7 @@ using System.Linq;
using System.Threading;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
internal sealed class KeyRingProvider : IKeyRingProvider
{

View File

@ -9,12 +9,12 @@ using System.Linq;
using System.Reflection;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.Security.DataProtection.Repositories;
using Microsoft.AspNet.Security.DataProtection.XmlEncryption;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.Repositories;
using Microsoft.AspNet.DataProtection.XmlEncryption;
using Microsoft.Framework.DependencyInjection;
namespace Microsoft.AspNet.Security.DataProtection.KeyManagement
namespace Microsoft.AspNet.DataProtection.KeyManagement
{
public sealed class XmlKeyManager : IKeyManager
{

View File

@ -5,7 +5,7 @@ using System;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Managed
namespace Microsoft.AspNet.DataProtection.Managed
{
internal static class HashAlgorithmExtensions
{

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.Managed
namespace Microsoft.AspNet.DataProtection.Managed
{
internal interface IManagedGenRandom
{

View File

@ -5,10 +5,10 @@ using System;
using System.IO;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.Security.DataProtection.SP800_108;
using Microsoft.AspNet.DataProtection.AuthenticatedEncryption;
using Microsoft.AspNet.DataProtection.SP800_108;
namespace Microsoft.AspNet.Security.DataProtection.Managed
namespace Microsoft.AspNet.DataProtection.Managed
{
// An encryptor which does Encrypt(CBC) + HMAC using SymmetricAlgorithm and HashAlgorithm.
// The payloads produced by this encryptor should be compatible with the payloads

View File

@ -4,7 +4,7 @@
using System;
using System.Security.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Managed
namespace Microsoft.AspNet.DataProtection.Managed
{
internal unsafe sealed class ManagedGenRandomImpl : IManagedGenRandom
{

View File

@ -5,7 +5,7 @@ using System;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.Managed
namespace Microsoft.AspNet.DataProtection.Managed
{
internal static class SymmetricAlgorithmExtensions
{

View File

@ -5,7 +5,7 @@ using System;
using System.Runtime.InteropServices;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// Support for generating random data.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.Azure
namespace Microsoft.AspNet.DataProtection
{
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
internal sealed class NotNullAttribute : Attribute

View File

@ -5,4 +5,4 @@ using System;
using System.Runtime.CompilerServices;
// for unit testing
[assembly: InternalsVisibleTo("Microsoft.AspNet.Security.DataProtection.Test")]
[assembly: InternalsVisibleTo("Microsoft.AspNet.DataProtection.Test")]

View File

@ -1,5 +1,5 @@
// <auto-generated />
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
using System.Globalization;
using System.Reflection;
@ -8,7 +8,7 @@ namespace Microsoft.AspNet.Security.DataProtection
internal static class Resources
{
private static readonly ResourceManager _resourceManager
= new ResourceManager("Microsoft.AspNet.Security.DataProtection.Resources", typeof(Resources).GetTypeInfo().Assembly);
= new ResourceManager("Microsoft.AspNet.DataProtection.Resources", typeof(Resources).GetTypeInfo().Assembly);
/// <summary>
/// An error occurred during a cryptographic operation.

View File

@ -8,7 +8,7 @@ using System.IO;
using System.Linq;
using System.Xml.Linq;
namespace Microsoft.AspNet.Security.DataProtection.Repositories
namespace Microsoft.AspNet.DataProtection.Repositories
{
/// <summary>
/// An XML repository backed by a file system.

View File

@ -5,7 +5,7 @@ using System;
using System.Collections.Generic;
using System.Xml.Linq;
namespace Microsoft.AspNet.Security.DataProtection.Repositories
namespace Microsoft.AspNet.DataProtection.Repositories
{
/// <summary>
/// The basic interface for storing and retrieving XML elements.

View File

@ -10,7 +10,7 @@ using System.Security.Principal;
using System.Xml.Linq;
using Microsoft.Win32;
namespace Microsoft.AspNet.Security.DataProtection.Repositories
namespace Microsoft.AspNet.DataProtection.Repositories
{
/// <summary>
/// An XML repository backed by the Windows registry.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
internal unsafe interface ISP800_108_CTR_HMACSHA512Provider : IDisposable
{

View File

@ -4,9 +4,9 @@
using System;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.Managed;
using Microsoft.AspNet.DataProtection.Managed;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
internal static class ManagedSP800_108_CTR_HMACSHA512
{

View File

@ -4,7 +4,7 @@
using System;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
internal unsafe static class SP800_108_CTR_HMACSHA512Extensions
{

View File

@ -5,7 +5,7 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
/// <summary>
/// Provides an implementation of the SP800-108-CTR-HMACSHA512 key derivation function.

View File

@ -6,7 +6,7 @@ using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
internal unsafe sealed class Win7SP800_108_CTR_HMACSHA512Provider : ISP800_108_CTR_HMACSHA512Provider
{

View File

@ -6,7 +6,7 @@ using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
namespace Microsoft.AspNet.Security.DataProtection.SP800_108
namespace Microsoft.AspNet.DataProtection.SP800_108
{
internal unsafe sealed class Win8SP800_108_CTR_HMACSHA512Provider : ISP800_108_CTR_HMACSHA512Provider
{

View File

@ -5,9 +5,9 @@ using System;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.Cng;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.Managed;
using Microsoft.AspNet.DataProtection.Managed;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
/// <summary>
/// Represents a secret value stored in memory.

View File

@ -5,11 +5,11 @@ using System;
using System.Security.Cryptography;
using Microsoft.AspNet.Cryptography;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
internal sealed class TimeLimitedDataProtector : ITimeLimitedDataProtector
{
internal const string PurposeString = "Microsoft.AspNet.Security.DataProtection.TimeLimitedDataProtector";
internal const string PurposeString = "Microsoft.AspNet.DataProtection.TimeLimitedDataProtector";
public TimeLimitedDataProtector(IDataProtector innerProtector)
{

View File

@ -4,7 +4,7 @@
using System;
using System.Diagnostics;
namespace Microsoft.AspNet.Security.DataProtection
namespace Microsoft.AspNet.DataProtection
{
// Internal copy of HttpAbstractions functionality.
internal static class WebEncoders

View File

@ -5,7 +5,7 @@ using System;
using System.Security.Cryptography.X509Certificates;
using System.Xml.Linq;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// A class that performs XML encryption using an X.509 certificate.

View File

@ -3,7 +3,7 @@
using System;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
// from ncrypt.h and ncryptprotect.h
[Flags]

View File

@ -5,9 +5,9 @@ using System;
using System.IO;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// A class that can decrypt XML elements which were encrypted using Windows DPAPI:NG.

View File

@ -8,10 +8,10 @@ using System.Security.Principal;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Cryptography.SafeHandles;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.AspNet.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.KeyManagement;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// A class that can encrypt XML elements using Windows DPAPI:NG.

View File

@ -5,9 +5,9 @@ using System;
using System.IO;
using System.Xml.Linq;
using Microsoft.AspNet.Cryptography;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.Cng;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// A class that can decrypt XML elements which were encrypted using Windows DPAPI.

View File

@ -4,10 +4,10 @@
using System;
using System.IO;
using System.Xml.Linq;
using Microsoft.AspNet.Security.DataProtection.Cng;
using Microsoft.AspNet.Security.DataProtection.KeyManagement;
using Microsoft.AspNet.DataProtection.Cng;
using Microsoft.AspNet.DataProtection.KeyManagement;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// A class that can encrypt XML elements using Windows DPAPI.

View File

@ -4,7 +4,7 @@
using System;
using System.Xml.Linq;
namespace Microsoft.AspNet.Security.DataProtection.XmlEncryption
namespace Microsoft.AspNet.DataProtection.XmlEncryption
{
/// <summary>
/// The basic interface for decrypting an XML element.

Some files were not shown because too many files have changed in this diff Show More