Example #1
0
/*  --------------------------------------------------------------------
 *  __mpa_dbg_print_mpanum_hex. Prints the value of a in hex.
 *
 */
void __mpa_dbg_print_mpanum_hexstr(const mpanum val)
{
    static char _str_[MPA_STR_MAX_SIZE];
    mpa_get_str(_str_, MPA_STRING_MODE_HEX_UC, 8, val);
    map_fprintf(logfd, "%s", _str_);
    map_fflush(logfd);
}
Example #2
0
/* write one */
static int write_radix(void *a, char *b, int radix)
{
	LTC_ARGCHK(a != NULL);
	LTC_ARGCHK(b != NULL);
	if (mpa_get_str(b, MPA_STRING_MODE_HEX_UC, (const mpanum)a) == 0) {
		return CRYPT_MEM;
	}
	return CRYPT_OK;
}