Skip to content

Commit

Permalink
Fixing cryptsharp version issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Murphy committed Jul 1, 2014
1 parent 8d3e561 commit 0463202
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ let buildDir = "./build/"
let testDir = "./test/"
let nugetDir = "./nuget/output/"
let packagingDir = "./nuget/working/"
let packageVersion = environVarOrDefault "PACKAGEVERSION" "1.0.2"
let version = environVarOrDefault "VERSION" "1.0.2.0"
let packageVersion = environVarOrDefault "PACKAGEVERSION" "1.0.3"
let version = environVarOrDefault "VERSION" "1.0.3.0"
let projectDescription = "IPasswordHasher implementation for Asp.Net Identity"
let projectName = "Malt.PasswordHasher"

Expand Down
8 changes: 3 additions & 5 deletions src/Malt.PasswordHasher/Crypto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@ public static class Crypto
public static byte[] HashWithPbkdf2<T>(string password, byte[] saltBytes, int iterations) where T : KeyedHashAlgorithm, new()
{
var passwordBytes = Encoding.UTF8.GetBytes(password);

var hashSize = new T().HashSize/8;
var hashedPassword = new byte[hashSize];

Pbkdf2.ComputeKey(passwordBytes, saltBytes, iterations, Pbkdf2.CallbackFromHmac<T>(), hashSize, hashedPassword);
var algorithm = new T() {Key = passwordBytes};
var hashSize = algorithm.HashSize / 8;
var hashedPassword = Pbkdf2.ComputeDerivedKey(algorithm, saltBytes, iterations, hashSize);
return hashedPassword;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Malt.PasswordHasher/Malt.PasswordHasher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="CryptSharp">
<HintPath>..\packages\CryptSharp.1.2.0.1\lib\net35\CryptSharp.dll</HintPath>
<HintPath>..\packages\CryptSharpOfficial.2.0.0.0\lib\CryptSharp.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Identity.Core">
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.0.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
Expand Down
6 changes: 3 additions & 3 deletions src/Malt.PasswordHasher/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[assembly: AssemblyTitleAttribute("Malt.PasswordHasher")]
[assembly: AssemblyDescriptionAttribute("IPasswordHasher implementation for Asp.Net Identity")]
[assembly: AssemblyProductAttribute("PasswordHasher")]
[assembly: AssemblyVersionAttribute("1.0.2.0")]
[assembly: AssemblyFileVersionAttribute("1.0.2.0")]
[assembly: AssemblyVersionAttribute("1.0.3.0")]
[assembly: AssemblyFileVersionAttribute("1.0.3.0")]
namespace System {
internal static class AssemblyVersionInformation {
internal const string Version = "1.0.2.0";
internal const string Version = "1.0.3.0";
}
}
2 changes: 1 addition & 1 deletion src/Malt.PasswordHasher/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CryptSharpOfficial" version="2.0.0.0" targetFramework="net451" />
<package id="Microsoft.AspNet.Identity.Core" version="2.0.1" targetFramework="net451" />
<package id="CryptSharpOfficial" version="2.0.0" targetFramework="net451" />
</packages>

0 comments on commit 0463202

Please sign in to comment.