mpi_read_buffer(9)
π NAME π
okay bestie, welcome to mpi_read_buffer(9) from the Kernel API Manual π this page is literally about read MPI to a buffer provided by user (msb first) β and yes, the msb first detail is iconic and stays. β¨
π SYNOPSIS π
int mpi_read_buffer (MPI a , uint8_t *buf , unsigned buf_len , unsigned *nbytes , int *sign );
look at that signature, slay π
πΈ ARGUMENTS πΈ
aβ a multi precision integer. your main character integer, fr fr π«Άbufβ buffer to which the output will be written to. Needs to be at leastmpi_get_size(a)long. no cap, size matters here πbuf_lenβ size of thebuf. the vibe check for how much room you actually gave it πnbytesβ receives the actual length of the data written on success and the data to-be-written on-EOVERFLOWin casebuf_lenwas too small. yep, itβs the receipts on success and the βbestie your buffer was too smallβ receipt on overflow πsignβ if notNULL, it will be set to the sign ofa. so if you pass a real pointer, it gets the sign, periodt π
π« RETURN π«
0 on success or error code in case of error β thatβs the whole mood, bestie β
π₯ SEE ALSO π₯
Kernel file ./lib/crypto/mpi/mpicoder.c β plus mpi_read_raw_data(9), mpi_write_to_sgl(9). go read those too, iykyk π«Άβ¨
source/version: ./lib/crypto/mpi Β· dated October 2026 β mwah, bestie ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms