src/treesutil.c
/**
 * generate hex strings for user data
 */
generate hex strings for user data
generate hex strings for user data
static void
hexuser(user_t *user)
{
    sodium_bin2hex(user->saltstr, sizeof user->saltstr,
                   user->salt, sizeof user->salt);
    sodium_bin2hex(user->noncestr, sizeof user->noncestr,
                   user->nonce, sizeof user->nonce);
    sodium_bin2hex(user->pubkeystr, sizeof user->pubkeystr,
                   user->pubkey, sizeof user->pubkey);
    sodium_bin2hex(user->lockedstr, sizeof user->lockedstr,
                   user->locked, sizeof user->locked);
    if(VERBOSE) {
        fputs("generating user hex\n", stderr);
        fprintf(stderr, "public: %s\nsalt: %s\nnonce: %s\nlocked: %s\n",
                user->pubkeystr, user->saltstr, user->noncestr, user->lockedstr);
    }
}
static void hexuser ( user_t * user ) { sodium_bin2hex ( user -> saltstr , sizeof user -> saltstr , user -> salt , sizeof user -> salt ) ; sodium_bin2hex ( user -> noncestr , sizeof user -> noncestr , user -> nonce , sizeof user -> nonce ) ; sodium_bin2hex ( user -> pubkeystr , sizeof user -> pubkeystr , user -> pubkey , sizeof user -> pubkey ) ; sodium_bin2hex ( user -> lockedstr , sizeof user -> lockedstr , user -> locked , sizeof user -> locked ) ; if ( VERBOSE ) { fputs ( " \n " , stderr ) ; fprintf ( stderr , " \n \n \n \n " , user -> pubkeystr , user -> saltstr , user -> noncestr , user -> lockedstr ) ; } }
generate hex strings for user data
generate hex strings for user data