Lines Matching defs:dbuf
84 readn_nointr(int fd, void *dbuf, size_t dlen)
86 char *marker = dbuf;
109 writen_nointr(int fd, void *dbuf, size_t dlen)
111 char *marker = dbuf;
214 pkcs11_read_common(int *fd, pthread_mutex_t *mtx, void *dbuf, size_t dlen)
219 n = readn_nointr(*fd, dbuf, dlen);
226 pkcs11_read_random(void *dbuf, size_t dlen)
228 return (pkcs11_read_common(&random_fd, &random_mutex, dbuf, dlen));
232 pkcs11_read_urandom(void *dbuf, size_t dlen)
234 return (pkcs11_read_common(&urandom_fd, &urandom_mutex, dbuf, dlen));
241 pkcs11_write_common(int *fd, pthread_mutex_t *mtx, void *dbuf, size_t dlen)
246 n = writen_nointr(*fd, dbuf, dlen);
253 pkcs11_write_random_seed(void *dbuf, size_t dlen)
256 dbuf, dlen));
260 pkcs11_write_urandom_seed(void *dbuf, size_t dlen)
263 dbuf, dlen));
317 pkcs11_get_random(void *dbuf, size_t dlen)
319 if (dbuf == NULL || dlen == 0)
326 if (pkcs11_read_random(dbuf, dlen) == dlen)
336 pkcs11_get_urandom(void *dbuf, size_t dlen)
338 if (dbuf == NULL || dlen == 0)
345 if (pkcs11_read_urandom(dbuf, dlen) == dlen)
354 pkcs11_get_nzero_urandom(void *dbuf, size_t dlen)
361 if (pkcs11_get_urandom(dbuf, dlen) < 0)
366 if (((char *)dbuf)[i] != 0) {
378 ((char *)dbuf)[i] = extrarand[bytesleft];