Niyebe, simple and secure pseudo-random string generator for the forgetful.
Generate random string with 46 characters:
$ niyebe 46
FYiM6%F[4"76.Td4<[xH3m2QEk-Pvoi%16H7H9mqEzp3a^
Generate random digits only
$ niyebe 20 --digits
16270019754304914183
Generate random ASCII characters in lowercase (a-z)
$ niyebe 20 --lowercase
befkycnjqdxmwwvxeykv
Generate random ASCII characters in uppercase (A-Z)
$ niyebe 20 --uppercase
VFBSOUMBDKAOBRLZGVGK
Generate random ASCII special characters
$ niyebe 20 --symbols
`;?_.#/?`<\+?_||&`(=
- generate secure random strings based on given length
- using OpenSSL under the hood
Niyebe is using OpenSSL's RAND_bytes function to generate secure random string. See code in action here.
- Operating System:
- Ubuntu, Debian (64-bit)
- Windows 10 or 11 (64-bit)
-
MSYS2 (UCRT64)
- CMake -
mingw-w64-ucrt-x86_64-cmake - MinGW-w64 -
mingw-w64-ucrt-x86_64-gcc - OpenSSL -
mingw-w64-ucrt-x86_64-openssl
CMake, MinGW and OpenSSL can be installed inside MSYS2 via
pacman - CMake -
- GNU Compiler Collection
- Git
- CMake
- libssl-dev
Using cmake via MSYS2 (UCRT64)
Debug build
> cmake.exe -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_BUILD_TYPE=Debug -B build/debug
> cmake.exe --build build/debug
> .\build\debug\bin\niyebe.exe
Using mingw32-make
> mingw32-make.exe
> niyebe.exe
Debug build
$ cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Debug -B build/debug
$ cmake --build build/debug
$ ./build/debug/bin/niyebe
$ make
$ ./niyebe
-
Create Release build
> cmake.exe -G "MinGW Makefiles" \ -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_PREFIX_PATH=C:/msys64/ucrt64 \ -B build/release > cmake.exe --build build/release > .\build\release\bin\niyebe.exe -
Install in
C:/Niyebedirectory> cmake --install build/release --config Release --prefix C:/Niyebe -
Run
niyebe.exe> C:/Niyebe/bin/niyebe.exe -v
-
Create Release build
$ cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -B build/release $ cmake --build build/release $ ./build/release/bin/niyebe -
Install
$ sudo cmake --install build/release --prefix /opt/niyebeThis will install/copy the compiled executable to
/opt/niyebe. -
Run
niyebe$ /opt/niyebe/bin/niyebe -v
To add niyebe to PATH
$ echo "export PATH="$PATH:/opt/niyebe"" >> ~/.bashrc
$ source ~/.bashrc