Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ Thumbs.db
*.lib
*.sbr
obj/
.vs/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
out/
build/
build/

/.vs
/bin
/obj
7 changes: 0 additions & 7 deletions AssemblyInfo.cs

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2013 Shawn Mclean and other SimpleCrypto.Net contributors.
Copyright 2024 hipperbyte from original Copyright 2013 Shawn Mclean and other SimpleCrypto.Net contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
[![NuGet](http://img.shields.io/nuget/v/SimpleCrypto.svg?style=flat-square)](https://www.nuget.org/packages/SimpleCrypto/)
[![Downloads](http://img.shields.io/nuget/dt/SimpleCrypto.svg?style=flat-square)](https://www.nuget.org/packages/SimpleCrypto/)
[![Build Status](http://img.shields.io/teamcity/codebetter/bt964.svg?style=flat-square)](http://teamcity.codebetter.com/project.html?projectId=project321&guest=1)
[![Code Coverage](http://img.shields.io/teamcity/coverage/bt964.svg?style=flat-square)](http://teamcity.codebetter.com/project.html?projectId=project321&guest=1)
[![NuGet](http://img.shields.io/nuget/v/net7-SimpleCrypto.svg?style=flat-square)](https://www.nuget.org/packages/net7-SimpleCrypto/)
[![Downloads](http://img.shields.io/nuget/dt/net7-SimpleCrypto.svg?style=flat-square)](https://www.nuget.org/packages/net7-SimpleCrypto/)


# SimpleCrypto.Net

# SimpleCrypto.Net (.net 7 version)

## NuGet

Visual Studio users can install this directly into their .NET projects by executing the following command in the [Package Manager Console](http://docs.nuget.org/docs/start-here/using-the-package-manager-console)

PM> Install-Package SimpleCrypto
PM> Install-Package net7-SimpleCrypto

## Description

Expand Down Expand Up @@ -64,5 +63,7 @@ SimpleCrypto.NET is licensed with the Apache License, version 2.0. You can find

##Changelog

1. **0.3.0.0 - March 14, 2013** - Generate Salt feature added.
2. **0.2.0.0 - September 16, 2012** - Generate Random password feature added.
1. **0.4.0.0 - March 07, 2023** - Updated version of source project to .net7.
2. **0.3.0.0 - March 14, 2013** - Generate Salt feature added.
3. **0.2.0.0 - September 16, 2012** - Generate Random password feature added.

70 changes: 0 additions & 70 deletions Rakefile

This file was deleted.

43 changes: 20 additions & 23 deletions SimpleCrypto.sln
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio Version 17
VisualStudioVersion = 17.5.33424.131
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FA42616F-B196-477E-B1C7-8AA8F7A2500E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D62D959A-C755-40AB-A773-0730D961BD16}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCrypto", "src\SimpleCrypto.csproj", "{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCrypto.Tests", "tests\SimpleCrypto.Tests.csproj", "{27FA9E8D-A1F3-4963-BF60-9DF623B86D58}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C2AB8C95-5AAF-42BC-B435-55E248A263F7}"
ProjectSection(SolutionItems) = preProject
AssemblyInfo.cs = AssemblyInfo.cs
LICENSE.txt = LICENSE.txt
nuspec.nuspec = nuspec.nuspec
Rakefile = Rakefile
README.md = README.md
VERSION = VERSION
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{AB6F4545-9DC4-46A2-B5B7-66C4EB396BDF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleCrypto.Tests", "tests\SimpleCrypto.Tests\SimpleCrypto.Tests.csproj", "{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleCrypto", "src\SimpleCrypto.csproj", "{8040A9F4-9B9E-4D56-801E-FC5A48D74957}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9}.Release|Any CPU.Build.0 = Release|Any CPU
{27FA9E8D-A1F3-4963-BF60-9DF623B86D58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27FA9E8D-A1F3-4963-BF60-9DF623B86D58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27FA9E8D-A1F3-4963-BF60-9DF623B86D58}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27FA9E8D-A1F3-4963-BF60-9DF623B86D58}.Release|Any CPU.Build.0 = Release|Any CPU
{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE}.Release|Any CPU.Build.0 = Release|Any CPU
{8040A9F4-9B9E-4D56-801E-FC5A48D74957}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8040A9F4-9B9E-4D56-801E-FC5A48D74957}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8040A9F4-9B9E-4D56-801E-FC5A48D74957}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8040A9F4-9B9E-4D56-801E-FC5A48D74957}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{ED8C6AD7-6CB7-4D5D-9A8F-C6E259DA40D9} = {FA42616F-B196-477E-B1C7-8AA8F7A2500E}
{27FA9E8D-A1F3-4963-BF60-9DF623B86D58} = {D62D959A-C755-40AB-A773-0730D961BD16}
{BD2D732A-3ED2-47E1-B7A7-FC70A87A7FFE} = {D62D959A-C755-40AB-A773-0730D961BD16}
{8040A9F4-9B9E-4D56-801E-FC5A48D74957} = {FA42616F-B196-477E-B1C7-8AA8F7A2500E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3D7529AC-A8B0-4194-845A-3F488AF50873}
EndGlobalSection
EndGlobal
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Binary file removed lib/Nunit/nunit.framework.dll
Binary file not shown.
19 changes: 0 additions & 19 deletions nuspec.nuspec

This file was deleted.

12 changes: 3 additions & 9 deletions src/Interfaces/ICryptoService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Threading.Tasks;

namespace SimpleCrypto
namespace SimpleCrypto
{
/// <summary>
/// Interface for Simple Crypto Service
Expand Down Expand Up @@ -35,7 +29,7 @@ public interface ICryptoService
/// Gets or sets the salt that will be used in computing the HashedText. This contains both Salt and HashIterations.
/// </summary>
string Salt { get; set; }

/// <summary>
/// Compute the hash
/// </summary>
Expand Down Expand Up @@ -86,7 +80,7 @@ public interface ICryptoService
/// <param name="iteration"></param>
/// <returns></returns>
int GetElapsedTimeForIteration(int iteration);

/// <summary>
/// Compare the passwords for equality
/// <param name="passwordHash1">The first password hash to compare</param>
Expand Down
10 changes: 3 additions & 7 deletions src/PBKDF2.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Diagnostics;
using System.Security.Cryptography;
using System.Text;
//using System.Threading.Tasks;


namespace SimpleCrypto
{
Expand Down Expand Up @@ -183,8 +180,7 @@ private string calculateHash(int iteration)
{
//convert the salt into a byte array
byte[] saltBytes = Encoding.UTF8.GetBytes(Salt);

var pbkdf2 = new Rfc2898DeriveBytes(PlainText, saltBytes, iteration);
var pbkdf2 = new Rfc2898DeriveBytes(PlainText, saltBytes, iteration,HashAlgorithmName.SHA1);
var key = pbkdf2.GetBytes(64);
return Convert.ToBase64String(key);
}
Expand Down
36 changes: 0 additions & 36 deletions src/Properties/AssemblyInfo.cs

This file was deleted.

4 changes: 0 additions & 4 deletions src/RandomPassword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
// Copyright (C) 2004 Obviex(TM). All rights reserved.
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;

namespace SimpleCrypto
{
Expand Down
Loading