Skip to content

Commit

Permalink
v1.0.22-beta:
Browse files Browse the repository at this point in the history
Added MAC keyed hashers like HMAC-SHA256 or MAC-3DES.
Added a MAC key importing/exporting utility MacKey in the style of EncryptedKey or ProtectedKey.
Changed the access of the classes `HashAlgorithmFactory`,`KeyedHashAlgorithmFactory`,`SymmetricAlgorithmFactory`, `KeyLocationStrategy` to public.
  • Loading branch information
vmelamed committed Jan 5, 2016
1 parent 910dd6f commit 5437979
Show file tree
Hide file tree
Showing 18 changed files with 47 additions and 38 deletions.
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>AspectExpressionSerialization</id>
<version>1.0.21</version>
<version>1.0.23</version>
<authors>Val Melamed</authors>
<owners>Val Melamed</owners>
<summary>
Expand Down
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.21")]
[assembly: AssemblyFileVersion("1.0.21")]
[assembly: AssemblyInformationalVersion("1.0.21")]
[assembly: AssemblyVersion("1.0.23")]
[assembly: AssemblyFileVersion("1.0.23")]
[assembly: AssemblyInformationalVersion("1.0.23")]

[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.21")]
[assembly: AssemblyFileVersion("1.0.21")]
[assembly: AssemblyInformationalVersion("1.0.21")]
[assembly: AssemblyVersion("1.0.23")]
[assembly: AssemblyFileVersion("1.0.23")]
[assembly: AssemblyInformationalVersion("1.0.23")]

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(
"vm.Aspects.Model.Tests, " +
Expand Down
6 changes: 3 additions & 3 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.21-beta</version>
<version>1.0.23-beta</version>
<authors>Val Melamed</authors>
<owners>Val Melamed</owners>
<summary>
Expand All @@ -12,8 +12,8 @@
A set of classes, utilities, etc. addressing various common cross-cutting concerns or extending existing similar libraries like Enterprise Library, Unity, etc.
</description>
<releaseNotes>
* Fixed a bug in vm.Aspects.Model.EFRepository where the EFSpecifics.IsChangeTracking was attempting to modify a key property if the name of the key is not named "Id".
* Now using AspectObjectDumper v1.5.0.
* Added and tested MAC keyed hashers like HMAC-SHA256 or MAC-3DES.
* Added and tested a MAC key importing/exporting utility "MacKey" in the style of EncryptedKey or ProtectedKey.
</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.21")]
[assembly: AssemblyFileVersion("1.0.21")]
[assembly: AssemblyInformationalVersion("1.0.21")]
[assembly: AssemblyVersion("1.0.23")]
[assembly: AssemblyFileVersion("1.0.23")]
[assembly: AssemblyInformationalVersion("1.0.23")]

[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.21")]
[assembly: AssemblyFileVersion("1.0.21")]
[assembly: AssemblyInformationalVersion("1.0.21")]
[assembly: AssemblyVersion("1.0.23")]
[assembly: AssemblyFileVersion("1.0.23")]
[assembly: AssemblyInformationalVersion("1.0.23")]


[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(
Expand Down
6 changes: 3 additions & 3 deletions Aspects/Security/Cryptography/Ciphers/Algorithms/Hash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class Hash
/// <summary>
/// SHA1. Not recommended. Prefer SHA256, and higher. Use for backwards compatibility only.
/// </summary>
[Obsolete("SHA-1 is not a recommended hash algorithm.")]
[Obsolete("SHA-1 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string Sha1 = "SHA1";
/// <summary>
/// SHA256.
Expand All @@ -44,13 +44,13 @@ public static class Hash
/// <summary>
/// MD5. Not recommended, use for backwards compatibility only.
/// </summary>
[Obsolete("MD5 is not a recommended hash algorithm.")]
[Obsolete("MD5 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string MD5 = "MD5";
/// <summary>
/// RIPEMD160 implemented by RIPEMD160Managed. Not recommended, use for backwards compatibility only.
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Ripemd")]
[Obsolete("RIPEMD5 is not a recommended hash algorithm.")]
[Obsolete("RIPEMD5 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string Ripemd160 = "RIPEMD160";
}
}
4 changes: 2 additions & 2 deletions Aspects/Security/Cryptography/Ciphers/Algorithms/KeyedHash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ public static class KeyedHash
/// <summary>
/// The HMAC-SHA1. Not recommended, use for backwards compatibility only.
/// </summary>
[Obsolete("HMAC-SHA-1 is not a recommended hash algorithm.")]
[Obsolete("HMAC-SHA-1 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string HmacSha1 = "HMACSHA1";
/// <summary>
/// The HMAC-RIPEMD160. Not recommended, use for backwards compatibility only.
/// </summary>
[Obsolete("HMAC-RIPEMD160 is not a recommended hash algorithm.")]
[Obsolete("HMAC-RIPEMD160 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string HmacRipemd160 = "HMACRIPEMD160";
}
}
4 changes: 4 additions & 0 deletions Aspects/Security/Cryptography/Ciphers/Algorithms/Symmetric.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

using System;

namespace vm.Aspects.Security.Cryptography.Ciphers.Algorithms
{
/// <summary>
Expand Down Expand Up @@ -39,6 +41,7 @@ public static class Symmetric
/// <summary>
/// The DES implemented by DESCryptoServiceProvider. Not recommended, use for backwards compatibility only.
/// </summary>
[Obsolete("DES is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string Des = "DES";

/// <summary>
Expand All @@ -49,6 +52,7 @@ public static class Symmetric
/// <summary>
/// The RC2 implemented by RC2CryptoServiceProvider. Not recommended, use for backwards compatibility only.
/// </summary>
[Obsolete("RC2 is not a recommended hash algorithm. It should be used only for backwards compatibility.")]
public const string RC2 = "RC2";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace vm.Aspects.Security.Cryptography.Ciphers
/// <summary>
/// Class <c>HashAlgorithmFactory</c> encapsulates the strategy for determining and realizing the hash algorithm.
/// </summary>
sealed class HashAlgorithmFactory : IHashAlgorithmFactory
public sealed class HashAlgorithmFactory : IHashAlgorithmFactory
{
/// <summary>
/// The resolved hash algorithm name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace vm.Aspects.Security.Cryptography.Ciphers
/// <item>by the path and name of the entry assembly with added suffix &quot;.KEY&quot;, e.g. &quot;MyApp.exe.KEY&quot;.</item>.
/// </list>
/// </summary>
sealed class KeyLocationStrategy : IKeyLocationStrategy
public sealed class KeyLocationStrategy : IKeyLocationStrategy
{
/// <summary>
/// The default key location suffix - .key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace vm.Aspects.Security.Cryptography.Ciphers
/// <summary>
/// Class <c>KeyedHashAlgorithmFactory</c> encapsulates the strategy for determining and realizing the keyed hash algorithm.
/// </summary>
sealed class KeyedHashAlgorithmFactory : IHashAlgorithmFactory
public sealed class KeyedHashAlgorithmFactory : IHashAlgorithmFactory
{
/// <summary>
/// The resolved keyed hash algorithm name
Expand Down
7 changes: 5 additions & 2 deletions Aspects/Security/Cryptography/Ciphers/NuGet/Ciphers.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>Ciphers</id>
<version>1.10.0</version>
<version>1.10.2</version>
<authors>Val Melamed</authors>
<owners>Val Melamed</owners>
<summary>
Expand All @@ -19,7 +19,8 @@
</description>
<releaseNotes>
Added MAC keyed hashers like HMAC-SHA256 or MAC-3DES.
Added a MAC key importing/exporting utility &quot;MacKey&quot; in the style of EncryptedKey or ProtectedKey.
Added a MAC key importing/exporting utility MacKey in the style of EncryptedKey or ProtectedKey.
Changed the access of the classes `HashAlgorithmFactory`,`KeyedHashAlgorithmFactory`,`SymmetricAlgorithmFactory`, `KeyLocationStrategy` to public.
</releaseNotes>
<licenseUrl>https://github.com/vmelamed/vm/blob/master/LICENSE</licenseUrl>
<projectUrl>https://github.com/vmelamed/vm/tree/master/Aspects/Security/Cryptography/Ciphers</projectUrl>
Expand All @@ -42,6 +43,8 @@
target="tools\net46"/>
<file src="..\ProtectedKey\bin\Release\ProtectedKey.exe"
target="tools\net46"/>
<file src="..\MacKey\bin\Release\MacKey.exe"
target="tools\net46"/>
<file src="..\ProtectedKey\bin\Release\vm.Aspects.Security.Cryptography.Ciphers.dll"
target="tools\net46"/>
<file src="..\ProtectedKey\bin\Release\Microsoft.Practices.ServiceLocation.dll"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ msbuild EncryptedKey\EncryptedKey.csproj /t:Rebuild /p:Configuration=Release /p:
if errorlevel 1 goto exit
msbuild ProtectedKey\ProtectedKey.csproj /t:Rebuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.6
if errorlevel 1 goto exit
msbuild MacKey\MacKey.csproj /t:Rebuild /p:Configuration=Release /p:TargetFrameworkVersion=v4.6
if errorlevel 1 goto exit
NuGet Pack NuGet\Ciphers.nuspec -Prop Configuration=Release
if errorlevel 1 goto exit
@echo Press any key to push to NuGet... > con:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// associated with an assembly.
[assembly: AssemblyTitle("vm.Aspects.Security.Cryptography.Ciphers")]
[assembly: AssemblyDescription("A set of cipher classes producing cipher-packages and encrypted and/or signed XML documents and elements.")]
[assembly: AssemblyVersion("1.10.0")]
[assembly: AssemblyFileVersion("1.10.0")]
[assembly: AssemblyInformationalVersion("1.10.0")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]
[assembly: AssemblyInformationalVersion("1.10.2")]

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(
"vm.Aspects.Security.Cryptography.Ciphers.Tests, " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace vm.Aspects.Security.Cryptography.Ciphers
/// <summary>
/// Class <c>SymmetricAlgorithmFactory</c> encapsulates the strategy for determining and realizing the symmetric algorithm.
/// </summary>
sealed class SymmetricAlgorithmFactory : ISymmetricAlgorithmFactory
public sealed class SymmetricAlgorithmFactory : ISymmetricAlgorithmFactory
{
/// <summary>
/// The resolved symmetric algorithm name
Expand Down
10 changes: 5 additions & 5 deletions Aspects/Security/Cryptography/Ciphers/Xml/SignedXmlWithId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class SignedXmlWithId : SignedXml
{
const string xmlIdXPathFormat = "//*[@{0}=\"{1}\"]";

static readonly string[] idAttributeDefaultNames =
static readonly string[] idAttributeDefaultNames =
{
XmlConstants.Id,
};
Expand All @@ -35,11 +35,11 @@ void SetIdAttributeNames(
}

/// <summary>
/// Returns the <see cref="T:System.Xml.XmlElement" /> object with the specified ID from the specified <see cref="T:System.Xml.XmlDocument" /> object.
/// Returns the <see cref="XmlElement" /> object with the specified ID from the specified <see cref="XmlDocument" /> object.
/// </summary>
/// <param name="document">The <see cref="T:System.Xml.XmlDocument" /> object to retrieve the <see cref="T:System.Xml.XmlElement" /> object from.</param>
/// <param name="idValue">The ID of the <see cref="T:System.Xml.XmlElement" /> object to retrieve from the <see cref="T:System.Xml.XmlDocument" /> object.</param>
/// <returns>The <see cref="T:System.Xml.XmlElement" /> object with the specified ID from the specified <see cref="T:System.Xml.XmlDocument" /> object, or null if it could not be found.</returns>
/// <param name="document">The <see cref="XmlDocument" /> object to retrieve the <see cref="XmlElement" /> object from.</param>
/// <param name="idValue">The ID of the <see cref="T:System.Xml.XmlElement" /> object to retrieve from the <see cref="XmlDocument" /> object.</param>
/// <returns>The <see cref="XmlElement" /> object with the specified ID from the specified <see cref="XmlDocument" /> object, or null if it could not be found.</returns>
public override XmlElement GetIdElement(
XmlDocument document,
string idValue)
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.21")]
[assembly: AssemblyFileVersion("1.0.21")]
[assembly: AssemblyInformationalVersion("1.0.21")]
[assembly: AssemblyVersion("1.0.23")]
[assembly: AssemblyFileVersion("1.0.23")]
[assembly: AssemblyInformationalVersion("1.0.23")]

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo(
"vm.Aspects.Wcf.Test, " +
Expand Down

0 comments on commit 5437979

Please sign in to comment.