Helper functions for libgcrypt MPIs. More...
Go to the source code of this file.
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-crypto-mpi", __VA_ARGS__) |
#define | LOG_GCRY(level, cmd, rc) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by gcry_strerror(rc). More... | |
Functions | |
static void | adjust (void *buf, size_t size, size_t target) |
If target != size, move target bytes to the end of the size-sized buffer and zero out the first target - size bytes. More... | |
void | GNUNET_CRYPTO_mpi_print_unsigned (void *buf, size_t size, gcry_mpi_t val) |
Output the given MPI value to the given buffer in network byte order. More... | |
void | GNUNET_CRYPTO_mpi_scan_unsigned (gcry_mpi_t *result, const void *data, size_t size) |
Convert data buffer into MPI value. More... | |
Helper functions for libgcrypt MPIs.
Definition in file crypto_mpi.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-crypto-mpi", __VA_ARGS__) |
Definition at line 33 of file crypto_mpi.c.
#define LOG_GCRY | ( | level, | |
cmd, | |||
rc | |||
) |
Log an error message at log-level 'level' that indicates a failure of the command 'cmd' with the message given by gcry_strerror(rc).
Definition at line 40 of file crypto_mpi.c.
|
static |
If target != size, move target bytes to the end of the size-sized buffer and zero out the first target - size bytes.
buf | original buffer |
size | number of bytes in buf |
target | target size of the buffer |
Definition at line 55 of file crypto_mpi.c.
Referenced by GNUNET_CRYPTO_mpi_print_unsigned().