niceBit

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

commit 179339a2d8ec19d0c7839f4b87bab3cf8332a88c
parent 852696240fd5f4f62f19380d27ec76198b0a4dea
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Fri, 27 Mar 2020 13:20:26 +1100

Remove excessive debug printing

Diffstat:
MwalletImportFormat.h | 43+++----------------------------------------
1 file changed, 3 insertions(+), 40 deletions(-)

diff --git a/walletImportFormat.h b/walletImportFormat.h @@ -24,48 +24,17 @@ char *create_wif(const unsigned char *privatekey) { newKey[i+1] = privatekey[i]; } - /* - for(int i=0; i<32; i++) { - printf("%02X", privatekey[i]); - } - printf("\n"); - - for(int i=0; i<33; i++) { - printf("%02X", newKey[i]); - } - printf("\n"); - */ - /* Perform SHA-256 hash on the extended key */ - SHA256(newKey, 33, SHAkey); - /* - for(int i=0; i<32; i++) { - printf("%02X", SHAkey[i]); - } - printf("\n"); - */ - + SHA256(newKey, 33, SHAkey); + /* Perform SHA-256 hash again on the result */ SHA256(SHAkey, 32, SHAkey2); - /* - for(int i=0; i<32; i++) { - printf("%02X", SHAkey2[i]); - } - printf("\n"); - */ - + /* Checksum is first 4 bytes of 2nd SHA*/ for(int i=0; i<4; i++) { checksum[i] = SHAkey2[i]; } - /* - for(int i=0; i<4; i++) { - printf("%02X", checksum[i]); - } - printf("\n"); - */ - /* Append checksum to end of 2nd SHA */ for(int i=0; i<33; i++) { combinedKey[i] = newKey[i]; @@ -73,12 +42,6 @@ char *create_wif(const unsigned char *privatekey) { for(int i=0; i<4; i++) { combinedKey[33+i] = checksum[i]; } - /* - for(int i=0; i<37; i++) { - printf("%02X", combinedKey[i]); - } - printf("\n"); - */ /* Encode with base-58 */ b58enc(wif, &wifSize, combinedKey, combinedKeySize);