Array of bytes?

Marco Bodrato bodrato at mail.dm.unipi.it
Wed Feb 21 22:19:42 UTC 2018


Ciao,

Il Mer, 21 Febbraio 2018 10:49 pm, RV ha scritto:
> 2) is there a way to get from an mpz_t variable, a sequence of bytes
> representing the number in the variable?  I suppose I could use get_str
> with base 16, but I was wondering if there was a faster more elegant way.

Maybe you are looking for mpz_export.

https://gmplib.org/manual/Integer-Import-and-Export.html


Ĝis,
m

-- 
http://bodrato.it/papers/



More information about the gmp-discuss mailing list