This question already has an answer here:
- How to generate a random string of a fixed length in Go? 10 answers
- How to generate unique random string in a length range using Golang? 1 answer
- How to generate unique random alphanumeric tokens in Golang? 2 answers
- How to generate a fixed length random number in Go? 2 answers
- Efficient way to to generate a random Hex string of a fixed length in Golang? 3 answers
Using python you could use the secrets
module like this.
import secrets
print(secrets.token_hex(16))
>>> a67c39a93429f53e5c2a711b0c8455b6
Is there a similar way to do this using Go?
Aucun commentaire:
Enregistrer un commentaire