Skip to content

Commit

Permalink
Move several classes from KeyManager.Library to KeyManager.Library.Ke…
Browse files Browse the repository at this point in the history
…yGen to reduce dependencies list of the core library
  • Loading branch information
Maxhy committed Feb 27, 2024
1 parent 4276eab commit 5a0294b
Show file tree
Hide file tree
Showing 39 changed files with 148 additions and 112 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Force.Crc32;

namespace Leosac.KeyManager.Library
namespace Leosac.KeyManager.Library.KeyGen
{
public class CRC32Checksum : KeyChecksum
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Org.BouncyCastle.Crypto.Parameters;
using System.Security.Cryptography;

namespace Leosac.KeyManager.Library
namespace Leosac.KeyManager.Library.KeyGen
{
/// <summary>
/// Key Checksum Value calculation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library
namespace Leosac.KeyManager.Library.KeyGen
{
public abstract class KeyChecksum
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Org.BouncyCastle.Security;
using System.Security.Cryptography;

namespace Leosac.KeyManager.Library
namespace Leosac.KeyManager.Library.KeyGen
{
public static class KeyHelper
{
Expand Down
48 changes: 48 additions & 0 deletions KeyManager.Library.KeyGen/KeyManager.Library.KeyGen.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Leosac.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.14.0</Version>
<Title>Leosac Key Manager Key Generation Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
<Authors>leosac</Authors>
<Description>Key Generation Library for Leosac Key Manager development</Description>
<Copyright>Copyright ©2024 Leosac SAS</Copyright>
<PackageProjectUrl>https://github.com/leosac/key-manager</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/leosac/key-manager.git</RepositoryUrl>
<PackageTags>leosac key manager generation</PackageTags>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
</PropertyGroup>

<ItemGroup>
<None Remove="Mnemonic\Words\English.txt" />
<None Remove="Mnemonic\Words\Francais.txt" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="Mnemonic\Words\English.txt" />
<EmbeddedResource Include="Mnemonic\Words\Francais.txt" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\KeyManager.Library\KeyManager.Library.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BouncyCastle.Cryptography" Version="2.2.1" />
<PackageReference Include="Crc32.NET" Version="1.2.0" />
<PackageReference Include="SecretSharingDotNet" Version="0.11.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Text;
using System.Text.RegularExpressions;

namespace Leosac.KeyManager.Library.Mnemonic
namespace Leosac.KeyManager.Library.KeyGen.Mnemonic
{
/// <summary>
/// Mnemonic calculation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library.Mnemonic
namespace Leosac.KeyManager.Library.KeyGen.Mnemonic
{
public class MnemonicException : Exception
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library.Mnemonic
namespace Leosac.KeyManager.Library.KeyGen.Mnemonic
{
public enum WordlistLang
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library.SecretSharing
namespace Leosac.KeyManager.Library.KeyGen.SecretSharing
{
public class ConcatSecretSharing : SecretSharingBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library.SecretSharing
namespace Leosac.KeyManager.Library.KeyGen.SecretSharing
{
public abstract class SecretSharingBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Numerics;

namespace Leosac.KeyManager.Library.SecretSharing
namespace Leosac.KeyManager.Library.KeyGen.SecretSharing
{
public class ShamirsSecretSharing : SecretSharingBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Leosac.KeyManager.Library.SecretSharing
namespace Leosac.KeyManager.Library.KeyGen.SecretSharing
{
public class XorSecretSharing : SecretSharingBase
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Security.Cryptography;

namespace Leosac.KeyManager.Library
namespace Leosac.KeyManager.Library.KeyGen
{
public class Sha256Checksum : KeyChecksum
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.13.1</Version>
<Version>1.14.0</Version>
<Title>Leosac Key Manager File Key Store Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
4 changes: 1 addition & 3 deletions KeyManager.Library.KeyStore.Memory/MemoryKeyStore.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Org.BouncyCastle.Tls;

namespace Leosac.KeyManager.Library.KeyStore.Memory
namespace Leosac.KeyManager.Library.KeyStore.Memory
{
public class MemoryKeyStore : KeyStore
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.13.1</Version>
<Version>1.14.0</Version>
<Title>Leosac Key Manager Plugin UI Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
2 changes: 1 addition & 1 deletion KeyManager.Library.Plugin/KeyManager.Library.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Leosac.$(AssemblyName)</PackageId>
<Version>1.13.1</Version>
<Version>1.14.0</Version>
<Title>Leosac Key Manager Plugin Library</Title>
<Company>Leosac SAS</Company>
<Product>Leosac Key Manager</Product>
Expand Down
Loading

0 comments on commit 5a0294b

Please sign in to comment.