Searched refs:nbits (Results 1 – 3 of 3) sorted by relevance
23 static uintptr_t trng_rnd32(uint32_t nbits, void *handle) in trng_rnd32() argument28 if (nbits == 0U || nbits > 96U) { in trng_rnd32()32 if (!trng_pack_entropy(nbits, &ent[0])) { in trng_rnd32()36 if ((nbits % 32U) != 0U) { in trng_rnd32()37 mask >>= 32U - (nbits % 32U); in trng_rnd32()40 switch ((nbits - 1U) / 32U) { in trng_rnd32()64 if (nbits == 0U || nbits > 192U) { in trng_rnd64()68 if (!trng_pack_entropy(nbits, &ent[0])) { in trng_rnd64()73 if ((nbits % 64U) != 0U) { in trng_rnd64()74 mask >>= 64U - (nbits % 64U); in trng_rnd64()[all …]
45 static bool trng_fill_entropy(uint32_t nbits) in trng_fill_entropy() argument47 while (nbits > entropy_bit_size) { in trng_fill_entropy()66 bool trng_pack_entropy(uint32_t nbits, uint64_t *out) in trng_pack_entropy() argument72 if (!trng_fill_entropy(nbits)) { in trng_pack_entropy()79 const int to_fill = ((nbits + BITS_PER_WORD - 1) / BITS_PER_WORD); in trng_pack_entropy()129 const uint64_t mask = ~0ULL >> (BITS_PER_WORD - (nbits % BITS_PER_WORD)); in trng_pack_entropy()133 entropy_bit_index = (entropy_bit_index + nbits) % BITS_IN_POOL; in trng_pack_entropy()134 entropy_bit_size -= nbits; in trng_pack_entropy()
13 bool trng_pack_entropy(uint32_t nbits, uint64_t *out);
Completed in 4 milliseconds