Hello I have a desire to write in the result of the code file:

package main
import (

func main() {
    // Print header
    fmt.Printf("%64s %34s %49s", "Private", "Public", "decoded")

    // Initialise big numbers with small numbers
    count, one := big.NewInt(0), big.NewInt(10000)

    // Create a slice to pad our count to 32 bytes
    padded := make([]byte, 32)

    // Loop forever because we're never going to hit the end anyway
    for {
        // Increment our counter
        count.Add(count, one)

        // Copy count value's bytes to padded slice
        copy(padded[32-len(count.Bytes()):], count.Bytes())

        // Get public key
        _, public := btcec.PrivKeyFromBytes(btcec.S256(), padded)

        // Get compressed and uncompressed addresses
        caddr, _ := btcutil.NewAddressPubKey(public.SerializeCompressed(), 
        decoded, version, err := base58.CheckDecode(caddr.EncodeAddress())
            if err != nil {
        // Print keys
        fmt.Printf("%x %34s %49s", padded, caddr.EncodeAddress(), 
        fmt.Println("", version)

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to