June 18, 2018
Random hex strings
As a developer is sometimes happens that I need to generate some random bytes as a hexadecimal string. This could be the case if you need a short lived token of some kind.
This is not something you should use to generate a password for any environment.
So I have compiled a small sample in the languages I usually develop in.
C#
using System; Random random = new Random(); var bytes = new Byte[30]; random.
Read more