/* Set a series of bytes with a random number. Individual bytes are not zero.  */
int ICACHE_FLASH_ATTR get_random_NZ(int num_rand_bytes, uint8_t *rand_data)
/* Set a series of bytes with a random number. Individual bytes are not zero.  */
int ICACHE_FLASH_ATTR get_random_NZ(int num_rand_bytes, uint8_t *rand_data)
{
    int i;
    if (get_random(num_rand_bytes, rand_data))
        return -1;
    for (i = 0; i < num_rand_bytes; i++)
    {
        while (rand_data[i] == 0)
            rand_data[i] = (uint8_t)(os_random());
    }
    return 0;
}