Good day people and especially to the newbies are getting curious how does the bitcoin address or any other altcoins address generated?. Today
I made a basic concept system that is open for everybody that you try
How does the address generated but first I would like you to introduce how does it work. Into the world of cryptocurrency, we need to make it secured all the time the address is generated randomly and check by the system it is already taken or not, after that, they will now generate the hash.
What is Hash/Hashing?Hash is used to encrypting the password, emails, address or other information must be hidden or secured.
How the receiver and the sender get the key to unhash?If both parties make some transaction they the sender already sent the key to the receiver so they can get the information easily.
What are the benefits of hashing?Hashing is good to avoid from the hackers because the only one can open the code is the receiver and the hacker takes time to decode the hash.
Introduction to System.
1.
Click generate. - the system will automatically create a random letter and number.
2.
Click Encrypt. - to make it encrypted. The sender will send the encrypted message to the receiver.
3.
Click Decrypt. -to make decrypted. The receiver uses the key to received and open the message.
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FDkP21OW.jpg&t=666&c=YgeGhnfLP1kcqw)
Random r = new Random();
char[] codes = "abcdefghijklmnopqrstuvwzyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToArray();
string output;
void generateKey(int gkey)
{
output = null;
for (int x = 0; x < codes.Length; x++)
{
output += codes[r.Next(0, codes.Length)];
}
t1bx.Text = output;
}
private void B_generate_Click(object sender, RoutedEventArgs e)
{
generateKey(10);
}
static string ComputeSha256Hash(string rawData)
{
// Create a SHA256
using (SHA256 sha256Hash = SHA256.Create())
{
// ComputeHash - returns byte array
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF8.GetBytes(rawData));
// Convert byte array to a string
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
return builder.ToString();
}
}
static string ComputeSha256Hash2(string rawData)
{
// Create a SHA256
using (SHA256 sha256Hash = SHA256.Create())
{
// ComputeHash - returns byte array
byte[] bytes = sha256Hash.ComputeHash(Encoding.UTF32.GetBytes(rawData));
// Convert byte array to a string
StringBuilder builder = new StringBuilder();
for (int i = 0; i < bytes.Length; i++)
{
builder.Append(bytes[i].ToString("x2"));
}
return builder.ToString();
}
}
private void B_hash_Click(object sender, RoutedEventArgs e)
{
txtbx_hash.Text = ComputeSha256Hash(output);
}
private void B_decrypt_Click(object sender, RoutedEventArgs e)
{
txtbx_dec.Text = output;
}
Ps. This is came to my knowledge and understanding I hope I help you a lot. Here is the project file if you want to test
Click here to download the file[This will direct to google drive].