Lines Matching refs:bytes_needed
143 size_t bytes_needed; in ossl_pool_acquire_entropy() local
154 bytes_needed = ossl_rand_pool_bytes_needed(pool, 4 /*entropy_factor*/); in ossl_pool_acquire_entropy()
156 for (i = 0; i < bytes_needed; i++) { in ossl_pool_acquire_entropy()
633 size_t bytes_needed; in ossl_pool_acquire_entropy()
639 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_pool_acquire_entropy()
640 while (bytes_needed != 0 && attempts-- > 0) { in ossl_pool_acquire_entropy()
641 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
642 bytes = syscall_random(buffer, bytes_needed); in ossl_pool_acquire_entropy()
645 bytes_needed -= bytes; in ossl_pool_acquire_entropy()
659 size_t bytes_needed; in ossl_pool_acquire_entropy()
663 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_pool_acquire_entropy()
664 for (i = 0; bytes_needed > 0 && i < OSSL_NELEM(random_device_paths); in ossl_pool_acquire_entropy()
674 while (bytes_needed != 0 && attempts-- > 0) { in ossl_pool_acquire_entropy()
675 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
676 bytes = read(fd, buffer, bytes_needed); in ossl_pool_acquire_entropy()
680 bytes_needed -= bytes; in ossl_pool_acquire_entropy()
689 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); in ossl_pool_acquire_entropy()
712 size_t bytes_needed; in ossl_pool_acquire_entropy()
716 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_pool_acquire_entropy()
717 for (i = 0; bytes_needed > 0 && paths[i] != NULL; i++) { in ossl_pool_acquire_entropy()
721 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
723 buffer, (int)bytes_needed); in ossl_pool_acquire_entropy()
724 if (num == (int)bytes_needed) in ossl_pool_acquire_entropy()
725 bytes = bytes_needed; in ossl_pool_acquire_entropy()
728 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); in ossl_pool_acquire_entropy()