Browse Source

Test

etomic
jl777 7 years ago
parent
commit
86ac6c4cad
  1. 3
      crypto777/iguana_utils.c
  2. 2
      iguana/exchanges/LP_privkey.c

3
crypto777/iguana_utils.c

@ -992,7 +992,7 @@ int32_t RS_encode(char *rsaddr,uint64_t id)
rsaddr[j++] = '-';
}
rsaddr[j] = 0;
printf("%llu -> NXT RS (%s)\n",(long long)id,rsaddr);
//printf("%llu -> NXT RS (%s)\n",(long long)id,rsaddr);
return(0);
}
@ -1123,6 +1123,7 @@ void calc_NXTaddr(char *hexstr,uint8_t *buf,uint8_t *msg,int32_t len)
{
uint8_t mysecret[32]; uint64_t nxt64bits;
nxt64bits = conv_NXTpassword(mysecret,buf,msg,len);
//printf("call RSencode with %llu\n",(long long)nxt64bits);
RS_encode(hexstr,nxt64bits);
}

2
iguana/exchanges/LP_privkey.c

@ -170,7 +170,6 @@ char *LP_secretaddresses(void *ctx,char *prefix,char *passphrase,int32_t n,uint8
n = 16;
else if ( n > 777 )
n = 777;
calc_NXTaddr(G.LP_NXTaddr,pubkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
conv_NXTpassword(privkey.bytes,pubkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
bitcoin_priv2pub(ctx,pubkey33,coinaddr,privkey,taddr,pubtype);
printf("generator (%s) secrets.[%d] <%s> t.%u p.%u\n",coinaddr,n,passphrase,taddr,pubtype);
@ -209,6 +208,7 @@ bits256 LP_privkeycalc(void *ctx,uint8_t *pubkey33,bits256 *pubkeyp,struct iguan
bits256 privkey,userpub,zero,userpass,checkkey; char tmpstr[128]; cJSON *retjson; uint8_t tmptype;
if ( passphrase != 0 && passphrase[0] != 0 )
{
calc_NXTaddr(G.LP_NXTaddr,userpub.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
conv_NXTpassword(privkey.bytes,pubkeyp->bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
//vcalc_sha256(0,checkkey.bytes,(uint8_t *)passphrase,(int32_t)strlen(passphrase));
//printf("SHA256.(%s) ",bits256_str(pstr,checkkey));

Loading…
Cancel
Save