Lines Matching defs:buffer

38 	const uint8_t *buffer = xbuffer;
44 while (nbytes > 0 && buffer[0] == 0) {
45 buffer++;
55 nbits -= count_leading_zeros(buffer[0]) - (BITS_PER_LONG - 8);
72 a |= *buffer++;
84 const uint8_t *buffer = xbuffer;
90 nbits = buffer[0] << 8 | buffer[1];
99 pr_info("MPI: mpi larger than buffer nbytes=%u ret_nread=%u\n",
104 val = mpi_read_raw_data(buffer + 2, nbytes);
237 * mpi_read_buffer() - read MPI to a buffer provided by user (msb first)
240 * @buf: buffer to which the output will be written to. Needs to be at
299 * mpi_get_buffer() - Returns an allocated buffer with the MPI (msb first).
301 * This function does return a 0 byte buffer with nbytes set to zero if the
305 * @nbytes: receives the length of this buffer.
308 * Return: Pointer to MPI buffer or NULL on error
429 * takes an sgl instead of void * buffer. i.e. it allocates
525 /* Perform a two's complement operation on buffer P of size N bytes. */
555 int mpi_print(enum gcry_mpi_format format, unsigned char *buffer,
596 /* Positive but the high bit of the returned buffer is set.
604 if (buffer && n > len) {
605 /* The provided buffer is too short. */
609 if (buffer) {
610 unsigned char *s = buffer;
626 * mpi_aprint because we can then use the buffer directly.
629 if (buffer && n > len)
631 if (buffer) {
637 memcpy(buffer, tmp, n);
649 if (buffer && n+2 > len)
652 if (buffer) {
654 unsigned char *s = buffer;
688 if (buffer && n+4 > len) {
693 if (buffer) {
694 unsigned char *s = buffer;
721 if (buffer && 2*n + extra + negative + 1 > len) {
725 if (buffer) {
726 unsigned char *s = buffer;
743 *nwritten = s - buffer;