I made a Python script which is launched on start-up (Linux) on my Raspberry Pi, and I need to get a random and unique identifier each time it starts.
The issue is that the system time is often the same, as Raspberry Pi does not have Real Time Clock and because there is no remote source in my system that I can use for time syncing.
When it comes to generate a random identifier, I read I could use uuid.uuid4(). However, I know that pseudo-random generator often use the current time as the seed source. I am worried about that, because it would be a huge weakness for my system here, as the identifier generated would have much more chance to collide.
I found the uuid4 specs, and mention is made all along of time and timestamp, so I am not sure I can use this as a good randomness source.
Is there any alterantive I could use, please?
Aucun commentaire:
Enregistrer un commentaire