GMP and MIME-Base64

Torbjorn Granlund tege at swox.com
Mon Jul 31 13:06:07 CEST 2006


"João Paulo Just" <jp at justsoft.com.br> writes:

  Hello all.
  
  I'm currently using base 36 numbers to calculate with GMP:
  
  x = mpz_get_str(NULL, 36, n);
  
  But, according to the manual, base can be from 2 up to 62. I'd like to now if there is a way to get Base64 numbers from mpz_get_str() and also with mpz_set_str().
  
Is Base64 defined for arbitrary precision integers?  I doubt it is.

If you just want output in base 64 (as opposed to Base64), mpz_export
should be able to do it.

-- 
Torbjörn


More information about the gmp-discuss mailing list