none
Brainwallet generator in vb.net RRS feed

  • Question

  • Hello every one i recently have tried to create my own brain-wallet generator and i did have made some progress on it  but now i don't know how to complete it  

    Imports System.Text
    Imports System.Security.Cryptography
    Imports System
    Imports System.IO
    Imports System.Numerics
    Public Class Form1
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            TextBox2.Text = crypt(TextBox1.Text)
        End Sub
    
    
        Private Function crypt(ByVal str As String) As String
            Dim molecule As New Security.Cryptography.SHA256CryptoServiceProvider
            Dim bytestring() As Byte = System.Text.Encoding.ASCII.GetBytes(str)
            bytestring = molecule.ComputeHash(bytestring)
            Dim finalstring As String = Nothing
    
            For Each line As Byte In bytestring
                finalstring &= line.ToString("x2")
            Next
    
            Return finalstring
        End Function
    
      
        Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
            Dim CHECK_SUM_SIZE As Integer = 4
            Dim DIGITS As String = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
            Dim result = System.Numerics.BigInteger.Parse(TextBox2.Text, System.Globalization.NumberStyles.AllowHexSpecifier)
            TextBox2.Text = Convert.ToString(result)
    end sub

    This is what i have made so far  

    1. converts the string to SHA 256password 

    2 converting the resulting string to biginteger

    while i am still trying to figure out these remaining steps 

    3. converting the resulting big integer to  base58 encoding 

    4 converting the resulting encoding to  private key  

    5 converting the resulting private key to  public key  

    if  anyone could help me to figure out  how exactly crypto currency works  

    kind regards  


    vinay pant

    Sunday, July 16, 2017 11:07 AM

Answers