Hi! ✌️ I need to generate some string in C++ with random characters that can use all letters from “a” to “z” (include capital letters), and all numbers from 0 to 9 there.
And for examples this should looks somehow like this:
SnHXAsOC5XDYLgiKM5ly
Also I want to encrypt that string then by itself:
SnHXAsOC5XDYLgiKM5ly
encrypt with SnHXAsOC5XDYLgiKM5ly
key.
So, how can I do this in C++? 🤔
Thanks in advance!
You could take inspiration from Theodore Tso’s pwgen: https://github.com/tytso/pwgen
It’s a Unix utility in C commonly used on Linux and FreeBSD to make truly random passwords. It’s the first thing I thought of when reading this.
It will be a really hard work https://github.com/tytso/pwgen/blob/master/pw_rand.c 🤔
But thanks to you! 😄
deleted by creator
deleted by creator
Thanks so much! 👍🏼