|
|
@ -219,12 +219,12 @@ cJSON *SuperNET_decryptedjson(char *destfname,char *passphrase,int32_t passsize, |
|
|
|
wallet2shared = SuperNET_wallet2shared(wallethash,wallet2priv); |
|
|
|
wallet2pub = curve25519(wallet2shared,curve25519_basepoint9()); |
|
|
|
sprintf(destfname,"%s/%s",GLOBAL_CONFSDIR,bits256_str(str,wallet2pub)); |
|
|
|
printf("fname.(%s) wallet2pub.%s < [%s, %s]\n",destfname,bits256_str(str,wallet2pub),passphrase,fname2fa); |
|
|
|
//printf("fname.(%s) wallet2pub.%s < [%s, %s]\n",destfname,bits256_str(str,wallet2pub),passphrase,fname2fa);
|
|
|
|
if ( (confstr= OS_filestr(&allocsize,destfname)) != 0 ) |
|
|
|
{ |
|
|
|
if ( (filejson= cJSON_Parse(confstr)) != 0 ) |
|
|
|
{ |
|
|
|
printf("confstr.(%s)\n",confstr); |
|
|
|
//printf("confstr.(%s)\n",confstr);
|
|
|
|
if ( (deciphered= SuperNET_decipher(0,0,0,0,wallet2shared,curve25519(wallethash,curve25519_basepoint9()),jstr(filejson,"result"))) != 0 ) |
|
|
|
{ |
|
|
|
if ( (json= cJSON_Parse(deciphered)) == 0 ) |
|
|
|