Skip to content

Commit

Permalink
1.0.3-beta.
Browse files Browse the repository at this point in the history
Moved EncryptedAttribute in the Ciphers project (where it should've been in a first place...)
  • Loading branch information
vmelamed committed Nov 30, 2015
1 parent e2664f1 commit 43ce4d3
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 53 deletions.
33 changes: 0 additions & 33 deletions Aspects/EncryptedAttribute.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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, " +
Expand Down
6 changes: 3 additions & 3 deletions Aspects/Model/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, " +
Expand Down
6 changes: 2 additions & 4 deletions Aspects/NuGet/vm.Aspects.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>vm.Aspects</id>
<version>1.0.2-beta</version>
<version>1.0.3-beta</version>
<authors>Val Melamed</authors>
<owners>Val Melamed</owners>
<summary>
Expand All @@ -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.
</description>
<releaseNotes>
Migrated to GitHub.
Added Money class.
Added EncryptedAttribute.
Moved EncryptedAttribute in the Ciphers project (where it should've been in a first place...)
</releaseNotes>
<licenseUrl>https://github.com/vmelamed/vm/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/vmelamed/vm/tree/master/Aspects</projectUrl>
Expand Down
6 changes: 3 additions & 3 deletions Aspects/Parsers/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, " +
Expand Down
6 changes: 3 additions & 3 deletions Aspects/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
44 changes: 44 additions & 0 deletions Aspects/Security/Cryptography/Ciphers/DecryptedAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System;

namespace vm.Aspects.Security.Cryptography.Ciphers
{
/// <summary>
/// DecryptedAttribute marks a property or field as one that must be first decrypted before accessing its actual value.
/// This class cannot be inherited.
/// </summary>
[Serializable]
[AttributeUsage(
AttributeTargets.Field |
AttributeTargets.Property,
AllowMultiple = false,
Inherited = true)]
public sealed class DecryptedAttribute : Attribute
{
/// <summary>
/// The default name of a property or field that holds the encrypted value.
/// </summary>
public const string DefaultEncryptedProperty = "Encypted";

/// <summary>
/// Gets or sets the name of the property or field which holds the encrypted value.
/// </summary>
public string EncryptedIn { get; }

/// <summary>
/// Gets a string that can be used to resolve which cipher should be selected from the DI container.
/// </summary>
public string CipherResolver { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="DecryptedAttribute"/> class.
/// </summary>
/// <param name="encrypted">
/// Sets the name of a property or field that holds the encrypted value.
/// </param>
public DecryptedAttribute(
string encrypted = DefaultEncryptedProperty)
{
EncryptedIn = encrypted;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@
<Compile Include="Contracts\Xml\IXmlCipherContract.cs" />
<Compile Include="Contracts\Xml\IXmlSignerContract.cs" />
<Compile Include="DpapiCipher.cs" />
<Compile Include="DecryptedAttribute.cs" />
<Compile Include="EncryptedKeyCipher.cs" />
<Compile Include="EncryptedNewKeyCipher.cs" />
<Compile Include="EncryptedNewKeyHashedCipher.cs" />
Expand Down
6 changes: 3 additions & 3 deletions Aspects/Wcf/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, " +
Expand Down
1 change: 0 additions & 1 deletion Aspects/vm.Aspects.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@
<Compile Include="DIContainer.ExtensionsRegister.cs" />
<Compile Include="DIContainer.GenericExtensions.cs" />
<Compile Include="DIContainer.GenericExtensions2.cs" />
<Compile Include="EncryptedAttribute.cs" />
<Compile Include="EnumFlagsExtensions.cs" />
<Compile Include="Exceptions\BusinessException.cs" />
<Compile Include="Exceptions\InvalidObjectException.cs" />
Expand Down

0 comments on commit 43ce4d3

Please sign in to comment.