niceBit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 948384eb1f1c37d16bf757039f842c2efa45db84
parent dacb8e3b9cc243c88da193997450eee5b83fd1da
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Sat,  4 Apr 2020 14:46:33 +1100

Implement searching for repeated letters

Diffstat:
MREADME.md | 1-
MniceBit.c | 9++++-----
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md @@ -29,4 +29,3 @@ Proof that this all works can be found via these [ingoing and outgoing transacti * Create make file * Add search from dictionary words * Include secp256k1 in lib -* Search for letters! Not just numbers... diff --git a/niceBit.c b/niceBit.c @@ -81,6 +81,7 @@ int gen_keypair(unsigned char *seckey, char *pubaddress, secp256k1_context *ctx) int check_vanity(char *pubaddress, int searchlen) { unsigned char compstr[40]; + char possibleChars[] = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; int j; /* For each vanity length @@ -89,16 +90,14 @@ int check_vanity(char *pubaddress, int searchlen) { for(int len=10; len>=searchlen; len--) { /* For each digit 1-9 */ - for(int i=0; i<10; i++) { + for(int i=0; i<58; i++) { /* Comprise compstr of 'len' repeats * of digit 'i' */ j = 0; while(j<len) { - /* Offset digit i by 48 - * as 48 is 0 in ASCII*/ - compstr[j] = i + 48; + compstr[j] = possibleChars[i]; j++; } @@ -120,7 +119,7 @@ int main(int argc, char **argv) { unsigned char seckey[32]; char pubaddress[40]; char *p = pubaddress; - char *n = "4"; + char *n = "5"; int searchlen; int c;