Lines Matching defs:nbytes
505 uint32_t pktlen, code, nbytes, entropybits = 0;
597 nbytes = be32toh(response.randomBytesSize);
598 if (nbytes > pktlen - offsetof(struct response, bytes)) {
601 nbytes, pktlen - offsetof(struct response, bytes));
602 nbytes = pktlen - offsetof(struct response, bytes);
611 entropybits = (NBBY/2)*nbytes;
612 rnd_add_data(&sc->sc_rnd, response.bytes, nbytes, entropybits);
645 uint32_t pktlen, code, nbytes, entropybits = 0;
735 nbytes = be16toh(response.randomBytesSize);
736 if (nbytes > pktlen - offsetof(struct response, bytes)) {
739 nbytes, pktlen - offsetof(struct response, bytes));
740 nbytes = pktlen - offsetof(struct response, bytes);
749 entropybits = (NBBY/2)*nbytes;
750 rnd_add_data(&sc->sc_rnd, response.bytes, nbytes, entropybits);
766 unsigned nbytes, entropybits;
770 nbytes = atomic_swap_uint(&sc->sc_rndpending, 0);
779 for (; nbytes; nbytes -= MIN(nbytes, MAX(1, entropybits/NBBY))) {
810 tpm_rng_get(size_t nbytes, void *cookie)
816 if (atomic_swap_uint(&sc->sc_rndpending, MIN(nbytes, UINT_MAX/NBBY))