Skip to content
Merged
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
3 changes: 3 additions & 0 deletions Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git pull && FOR %%a in (*.sln) DO "D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" %%a /p:Configuration=Release


10 changes: 7 additions & 3 deletions FileConfunder.sln → Confunder.sln
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
# Visual Studio Version 18
VisualStudioVersion = 18.8.12009.203 stable
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileConfunder", "FileConfunder\FileConfunder.csproj", "{11E4908A-80F5-4C7E-9994-379927B5FF28}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Confunder", "Confunder\Confunder.csproj", "{DDCB9592-9AAA-7392-366F-B6F351FF1712}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -15,6 +15,10 @@ Global
{11E4908A-80F5-4C7E-9994-379927B5FF28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11E4908A-80F5-4C7E-9994-379927B5FF28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11E4908A-80F5-4C7E-9994-379927B5FF28}.Release|Any CPU.Build.0 = Release|Any CPU
{DDCB9592-9AAA-7392-366F-B6F351FF1712}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DDCB9592-9AAA-7392-366F-B6F351FF1712}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DDCB9592-9AAA-7392-366F-B6F351FF1712}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DDCB9592-9AAA-7392-366F-B6F351FF1712}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
18 changes: 18 additions & 0 deletions Confunder/Confunder.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<AssemblyName>confunder</AssemblyName>
<RootNamespace>Confunder</RootNamespace>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
</PropertyGroup>

<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
25 changes: 11 additions & 14 deletions FileConfunder/FPE.Net/Ciphers.cs → Confunder/FPE.Net/Ciphers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ internal class Ciphers
/**
* Instance of the AES cipher in ECB mode with no padding.
*/
private AesManaged mAesEcbCipher;
private Aes mAesEcbCipher;

/**
* Instance of the AES cipher in CBC mode with no padding.
*/
private AesManaged mAesCbcCipher;
private Aes mAesCbcCipher;

/**
* Constructs a Ciphers instance with the required AES ciphers.
Expand All @@ -47,18 +47,15 @@ public Ciphers()
{
try
{
mAesEcbCipher = new AesManaged() {
Mode = CipherMode.ECB,
Padding = PaddingMode.None,
KeySize = 128
};

mAesCbcCipher = new AesManaged()
{
Mode = CipherMode.CBC,
Padding = PaddingMode.None,
KeySize = 128
};
mAesEcbCipher = Aes.Create();
mAesEcbCipher.Mode = CipherMode.ECB;
mAesEcbCipher.Padding = PaddingMode.None;
mAesEcbCipher.KeySize = 128;

mAesCbcCipher = Aes.Create();
mAesCbcCipher.Mode = CipherMode.CBC;
mAesCbcCipher.Padding = PaddingMode.None;
mAesCbcCipher.KeySize = 128;
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ public static int[] str(BigInteger x, int radix, int m)

// type conversion for readability
BigInteger r = radix;

// validate x
if (x == null)
throw new NullReferenceException("x must not be null");

if (x.CompareTo(BigInteger.Zero) < 0 ||
x.CompareTo(BigInteger.Pow(r, m)) >= 0)
throw new Exception("X is not within the permitted range of 0.." + BigInteger.Pow(r, m) + ": " + x);
Expand Down
File renamed without changes.
File renamed without changes.
725 changes: 725 additions & 0 deletions Confunder/Program.cs

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Confunder/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"profiles": {
"FileConfunder_2": {
"commandName": "Project"
}
}
}
1 change: 1 addition & 0 deletions Confunder/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 0 additions & 21 deletions FileConfunder/App.config

This file was deleted.

67 changes: 0 additions & 67 deletions FileConfunder/FileConfunder.csproj

This file was deleted.

Loading