Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for printing non-EC-multiply encrypted keys #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
47 changes: 46 additions & 1 deletion BtcAddress.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@
</SccAuxPath>
<SccProvider>
</SccProvider>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
Expand Down Expand Up @@ -63,6 +78,12 @@
<ItemGroup>
<Compile Include="Barcode\Barcode128b.cs" />
<Compile Include="Barcode\QR.cs" />
<Compile Include="Forms\AddEncryptedKey.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AddEncryptedKey.Designer.cs">
<DependentUpon>AddEncryptedKey.cs</DependentUpon>
</Compile>
<Compile Include="Model\Base58.cs" />
<Compile Include="Model\Base58CheckString.cs" />
<Compile Include="Model\Bip38Base.cs" />
Expand Down Expand Up @@ -185,6 +206,9 @@
<Compile Include="Reports\CoinInsert.cs">
<SubType>Component</SubType>
</Compile>
<EmbeddedResource Include="Forms\AddEncryptedKey.resx">
<DependentUpon>AddEncryptedKey.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\AddressGen.resx">
<DependentUpon>AddressGen.cs</DependentUpon>
</EmbeddedResource>
Expand Down Expand Up @@ -251,7 +275,28 @@
<ItemGroup>
<Content Include="bitcoinlogo.ico" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
13 changes: 13 additions & 0 deletions BtcAddress.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory />
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>en-US</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
</Project>
Binary file added BtcAddress.v12.suo
Binary file not shown.
133 changes: 133 additions & 0 deletions Forms/AddEncryptedKey.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions Forms/AddEncryptedKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Casascius.Bitcoin;

namespace BtcAddress.Forms {
public partial class AddEncryptedKey : Form {
public AddEncryptedKey() {
InitializeComponent();
}

public object Result;

private void btnOK_Click(object sender, EventArgs e) {

if (txtBoxPlainPrivKey.Text == "") {
MessageBox.Show("Enter a key first.");
return;
}

Result = StringInterpreter.Interpret(txtBoxPlainPrivKey.Text, this.chkBoxCompress.Checked);
if (Result == null) {
MessageBox.Show("Unrecognized or invalid string");
} else {

if (Result is KeyPair) {
Result = new Bip38KeyPair(Result as KeyPair, txtBoxPassphrase.Text);
}

this.Close();
}

}

private void AddEncryptedKey_Load(object sender, EventArgs e)
{

}

private void label1_Click(object sender, EventArgs e)
{

}
}
}
Loading