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
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node-terminal",
"name": "JavaScript Debug Terminal",
"request": "launch",
"cwd": "${workspaceFolder}"
}
]
}
2 changes: 2 additions & 0 deletions Src/FinderOuter/Backend/ECC/Calc2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public bool Test()

string actual = final.ToArray().ToBase16();

#pragma warning disable CS0612
using PrivateKey key = new(data.ToArray());
#pragma warning restore CS0612
string expected = key.ToPublicKey().ToByteArray(false).ToBase16();

Debug.Assert(actual == expected);
Expand Down
2 changes: 1 addition & 1 deletion Src/FinderOuter/Backend/Hashing/Hash160Fo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static unsafe byte[] Compress33(Span<byte> data)

public static unsafe byte[] Compress65(Span<byte> data)
{
Debug.Assert(data != null && data.Length == 65);
Debug.Assert(data.Length == 65);

uint* pt = stackalloc uint[Sha256Fo.UBufferSize];
fixed (byte* dPt = &data[0])
Expand Down
2 changes: 1 addition & 1 deletion Src/FinderOuter/Backend/Hashing/Sha256Fo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@ public static unsafe void CompressDouble40(uint* pt)
/// <param name="data">65 byte data</param>
public static unsafe byte[] CompressDouble65(Span<byte> data)
{
Debug.Assert(data != null && data.Length == 65);
Debug.Assert(data.Length == 65);

uint* pt = stackalloc uint[UBufferSize];
fixed (byte* dPt = &data[0])
Expand Down
2 changes: 1 addition & 1 deletion Src/FinderOuter/FinderOuter.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AssemblyVersion>0.20.0.0</AssemblyVersion>
<FileVersion>0.20.0.0</FileVersion>
<Version>0.20.0.0</Version>
Expand Down
2 changes: 2 additions & 0 deletions Src/FinderOuter/Services/ArmoryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public ArmoryService(IReport rep)
private int[] missingIndexes;
private bool hasChainCode;
private byte[] chainCode;
#pragma warning disable CS0612
private readonly BigInteger N = new SecP256k1().N;
#pragma warning restore CS0612



Expand Down
6 changes: 6 additions & 0 deletions Src/FinderOuter/Services/Base58Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ private bool IsMissingFromEnd()
private BigInteger wifEndStart;
private void SetResultParallelWifEnd(int added)
{
#pragma warning disable CS0612
using PrivateKey tempKey = new(wifEndStart + added);
#pragma warning restore CS0612
string tempWif = tempKey.ToWif(isWifEndCompressed);
report.AddMessageSafe($"Found the key: {tempWif}");
report.FoundAnyResult = true;
Expand Down Expand Up @@ -141,7 +143,9 @@ private void WifLoopMissingEnd(bool compressed)
BigInteger diff = end - start + 1;
report.AddMessageSafe($"Using an optimized method checking only {diff:n0} keys.");

#pragma warning disable CS0612
Autarkysoft.Bitcoin.Cryptography.Asymmetric.EllipticCurve.SecP256k1 curve = new();
#pragma warning restore CS0612
if (start == 0 || end >= curve.N)
{
report.AddMessageSafe("There is something wrong with the given key, it is outside of valid key range.");
Expand All @@ -154,7 +158,9 @@ private void WifLoopMissingEnd(bool compressed)
{
for (int i = 0; i < (int)diff; i++)
{
#pragma warning disable CS0612
using PrivateKey tempKey = new(start + i);
#pragma warning restore CS0612
string tempWif = tempKey.ToWif(compressed);
if (tempWif.Contains(baseWif))
{
Expand Down
2 changes: 2 additions & 0 deletions Src/FinderOuter/Services/Comparers/PrvToPrvComparer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public bool Init(string data)
{
try
{
#pragma warning disable CS0612
using PrivateKey temp = new(data);
#pragma warning restore CS0612
expectedBytes = temp.ToBytes();
expectedKey = new(expectedBytes, out _);
IsInitialized = true;
Expand Down
2 changes: 1 addition & 1 deletion Src/Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down