From 43ce4d3b8a7f05555bba1c97bf26f942f3547bd0 Mon Sep 17 00:00:00 2001 From: vmelamed Date: Mon, 30 Nov 2015 13:44:40 -0500 Subject: [PATCH] 1.0.3-beta. Moved EncryptedAttribute in the Ciphers project (where it should've been in a first place...) --- Aspects/EncryptedAttribute.cs | 33 -------------- .../Serialization/Properties/AssemblyInfo.cs | 6 +-- Aspects/Model/Properties/AssemblyInfo.cs | 6 +-- Aspects/NuGet/vm.Aspects.nuspec | 6 +-- Aspects/Parsers/Properties/AssemblyInfo.cs | 6 +-- Aspects/Properties/AssemblyInfo.cs | 6 +-- .../Ciphers/DecryptedAttribute.cs | 44 +++++++++++++++++++ ...pects.Security.Cryptography.Ciphers.csproj | 1 + Aspects/Wcf/Properties/AssemblyInfo.cs | 6 +-- Aspects/vm.Aspects.csproj | 1 - 10 files changed, 62 insertions(+), 53 deletions(-) delete mode 100644 Aspects/EncryptedAttribute.cs create mode 100644 Aspects/Security/Cryptography/Ciphers/DecryptedAttribute.cs diff --git a/Aspects/EncryptedAttribute.cs b/Aspects/EncryptedAttribute.cs deleted file mode 100644 index 3b57401..0000000 --- a/Aspects/EncryptedAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; - -namespace vm.Aspects -{ - /// - /// EncryptedAttribute marks a property, field, return value or a parameter as being encrypted. - /// This class cannot be inherited. - /// - [Serializable] - [AttributeUsage( - AttributeTargets.Field | - AttributeTargets.Property | - AttributeTargets.ReturnValue | - AttributeTargets.Parameter, - AllowMultiple = false, - Inherited = true)] - public sealed class EncryptedAttribute : Attribute - { - /// - /// Gets a string that can be used to resolve which cipher should be selected from the DI container. - /// - public string CipherResolver { get; } - - /// - /// Initializes a new instance of the class. - /// - /// An optional string that can be used to resolve which cipher should be selected from the DI container. - public EncryptedAttribute(string cipherResolver = null) - { - CipherResolver = cipherResolver; - } - } -} diff --git a/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs b/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs index 5057f22..7610935 100644 --- a/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs +++ b/Aspects/Linq/Expressions/Serialization/Properties/AssemblyInfo.cs @@ -4,9 +4,9 @@ [assembly: AssemblyTitle("vm.Aspects.Linq.Expressions.Serialization")] [assembly: AssemblyDescription("Serializes and deserializes LINQ expression trees to and from XML documents.")] -[assembly: AssemblyVersion("1.0.2")] -[assembly: AssemblyFileVersion("1.0.2")] -[assembly: AssemblyInformationalVersion("1.0.2")] +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyInformationalVersion("1.0.3")] [assembly: InternalsVisibleTo( "vm.Aspects.Linq.Expressions.Serialization.Test, " + diff --git a/Aspects/Model/Properties/AssemblyInfo.cs b/Aspects/Model/Properties/AssemblyInfo.cs index fe17e6f..051095c 100644 --- a/Aspects/Model/Properties/AssemblyInfo.cs +++ b/Aspects/Model/Properties/AssemblyInfo.cs @@ -3,9 +3,9 @@ [assembly: AssemblyTitle("vm.Aspect.Model")] [assembly: AssemblyDescription("Defines the IRepository and related base classes and utilities - a framework of building domain object model.")] -[assembly: AssemblyVersion("1.0.2")] -[assembly: AssemblyFileVersion("1.0.2")] -[assembly: AssemblyInformationalVersion("1.0.2")] +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyInformationalVersion("1.0.3")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Model.Tests, " + diff --git a/Aspects/NuGet/vm.Aspects.nuspec b/Aspects/NuGet/vm.Aspects.nuspec index de6dfec..1d825cc 100644 --- a/Aspects/NuGet/vm.Aspects.nuspec +++ b/Aspects/NuGet/vm.Aspects.nuspec @@ -2,7 +2,7 @@ vm.Aspects - 1.0.2-beta + 1.0.3-beta Val Melamed Val Melamed @@ -12,9 +12,7 @@ A set of classes, utilities, etc. addressing various common cross-cutting concerns or extending existing similar libraries like Enterprise Library, Unity, etc. - Migrated to GitHub. - Added Money class. - Added EncryptedAttribute. + Moved EncryptedAttribute in the Ciphers project (where it should've been in a first place...) https://github.com/vmelamed/vm/blob/master/LICENSE https://github.com/vmelamed/vm/tree/master/Aspects diff --git a/Aspects/Parsers/Properties/AssemblyInfo.cs b/Aspects/Parsers/Properties/AssemblyInfo.cs index dba6765..d17e71b 100644 --- a/Aspects/Parsers/Properties/AssemblyInfo.cs +++ b/Aspects/Parsers/Properties/AssemblyInfo.cs @@ -6,9 +6,9 @@ [assembly: AssemblyTitle("vm.Aspects.Parser")] [assembly: AssemblyDescription("Text parsing readers, e.g. CSV/TSV reader.")] -[assembly: AssemblyVersion("1.0.2")] -[assembly: AssemblyFileVersion("1.0.2")] -[assembly: AssemblyInformationalVersion("1.0.2")] +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyInformationalVersion("1.0.3")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Parsers.Tests, " + diff --git a/Aspects/Properties/AssemblyInfo.cs b/Aspects/Properties/AssemblyInfo.cs index dc174f9..3046bc8 100644 --- a/Aspects/Properties/AssemblyInfo.cs +++ b/Aspects/Properties/AssemblyInfo.cs @@ -2,9 +2,9 @@ [assembly: AssemblyTitle("vm.Aspects")] [assembly: AssemblyDescription("A set of classes addressing various common cross-cutting concerns.")] -[assembly: AssemblyVersion("1.0.2")] -[assembly: AssemblyFileVersion("1.0.2")] -[assembly: AssemblyInformationalVersion("1.0.2")] +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyInformationalVersion("1.0.3")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( diff --git a/Aspects/Security/Cryptography/Ciphers/DecryptedAttribute.cs b/Aspects/Security/Cryptography/Ciphers/DecryptedAttribute.cs new file mode 100644 index 0000000..5d373ff --- /dev/null +++ b/Aspects/Security/Cryptography/Ciphers/DecryptedAttribute.cs @@ -0,0 +1,44 @@ +using System; + +namespace vm.Aspects.Security.Cryptography.Ciphers +{ + /// + /// DecryptedAttribute marks a property or field as one that must be first decrypted before accessing its actual value. + /// This class cannot be inherited. + /// + [Serializable] + [AttributeUsage( + AttributeTargets.Field | + AttributeTargets.Property, + AllowMultiple = false, + Inherited = true)] + public sealed class DecryptedAttribute : Attribute + { + /// + /// The default name of a property or field that holds the encrypted value. + /// + public const string DefaultEncryptedProperty = "Encypted"; + + /// + /// Gets or sets the name of the property or field which holds the encrypted value. + /// + public string EncryptedIn { get; } + + /// + /// Gets a string that can be used to resolve which cipher should be selected from the DI container. + /// + public string CipherResolver { get; set; } + + /// + /// Initializes a new instance of the class. + /// + /// + /// Sets the name of a property or field that holds the encrypted value. + /// + public DecryptedAttribute( + string encrypted = DefaultEncryptedProperty) + { + EncryptedIn = encrypted; + } + } +} diff --git a/Aspects/Security/Cryptography/Ciphers/vm.Aspects.Security.Cryptography.Ciphers.csproj b/Aspects/Security/Cryptography/Ciphers/vm.Aspects.Security.Cryptography.Ciphers.csproj index 60c8da5..d34cdea 100644 --- a/Aspects/Security/Cryptography/Ciphers/vm.Aspects.Security.Cryptography.Ciphers.csproj +++ b/Aspects/Security/Cryptography/Ciphers/vm.Aspects.Security.Cryptography.Ciphers.csproj @@ -387,6 +387,7 @@ + diff --git a/Aspects/Wcf/Properties/AssemblyInfo.cs b/Aspects/Wcf/Properties/AssemblyInfo.cs index 211046c..cdc2c64 100644 --- a/Aspects/Wcf/Properties/AssemblyInfo.cs +++ b/Aspects/Wcf/Properties/AssemblyInfo.cs @@ -3,9 +3,9 @@ [assembly: AssemblyTitle("Wcf")] [assembly: AssemblyDescription("A set of classes and generics simplifying the initial configuration work of creating WCF services.")] -[assembly: AssemblyVersion("1.0.2")] -[assembly: AssemblyFileVersion("1.0.2")] -[assembly: AssemblyInformationalVersion("1.0.2")] +[assembly: AssemblyVersion("1.0.3")] +[assembly: AssemblyFileVersion("1.0.3")] +[assembly: AssemblyInformationalVersion("1.0.3")] [assembly: System.Runtime.CompilerServices.InternalsVisibleTo( "vm.Aspects.Wcf.Test, " + diff --git a/Aspects/vm.Aspects.csproj b/Aspects/vm.Aspects.csproj index 9159c11..c06cc1d 100644 --- a/Aspects/vm.Aspects.csproj +++ b/Aspects/vm.Aspects.csproj @@ -256,7 +256,6 @@ -