aboutsummaryrefslogtreecommitdiff
path: root/passgen.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-01-14Add grammar mappings to help messageNicholas Tay1-1/+5
These should be quite useful since I forget what the mappings are sometimes, and maybe want to make a custom grammar.
2022-01-14Split out classes into an array of custom structNicholas Tay1-11/+24
Would allow us to access in --help. Also just seems like a nicer way to store in case we need to extend it.
2022-01-13Add help optionNicholas Tay1-0/+13
2022-01-13Fix + add error messageNicholas Tay1-1/+2
2022-01-13Allow 0 tripletsNicholas Tay1-8/+5
2022-01-13Use static buffers for regular password generationNicholas Tay1-16/+22
This is probably a micro-optimisation, but since that is partly the point of this random C project, let's do it :)
2022-01-13Fix generation for number params (forgot grammar_size)Nicholas Tay1-5/+5
2022-01-11Run astyleNicholas Tay1-2/+2
2022-01-11Fix potential invalid free on password ptrNicholas Tay1-2/+3
2022-01-11Add wincrypt support for RNG on WindowsNicholas Tay1-25/+49
2022-01-11Enforce unsigned int for RNG generationNicholas Tay1-2/+2
Need this for it to work properly, I think with the mod
2022-01-11Split out logic into nice functionsNicholas Tay1-49/+71
2022-01-11BSD support for getentropy()Nicholas Tay1-3/+14
2022-01-11Reorganise/remove unneeded includesNicholas Tay1-1/+4
2022-01-11Use getentropy on macOSNicholas Tay1-3/+3
2022-01-10Switch to getentropy C api (to port to macOS)Nicholas Tay1-3/+2
2022-01-10Fix tabs -> spacesNicholas Tay1-2/+2
2022-01-05astyle + additional comments (+ to c89 style)Nicholas Tay1-10/+22
https://gist.github.com/nicholastay/9eb6a455d6b17b810cd8e7bec2a5dfe7
2021-12-03astyle K&RNicholas Tay1-75/+75
2021-12-02Print error messages to stderr insteadNicholas Tay1-3/+2
2021-12-02Needless import of unistd on LinuxNicholas Tay1-2/+4
2021-12-02Dynamically allocate password instead of using VLANicholas Tay1-1/+16
This allows the code to compile with `cl` (MS Windows). Additionally allows massive passwords to be made more easily I suppose, as we aren't allocating (potentially dangerously) on the stack anymore. But, generation may be slightly slower due to allocation of memory. We could possibly have some statically allocated memory (e.g. 20 bytes) and if we go over then malloc().
2021-12-02More explicit custom grammar flag for free()Nicholas Tay1-2/+4
This also allows the program to be compiled with Clang.
2021-12-02CRLF -> LFNicholas Tay1-101/+101
2021-12-02Less syscalls the better? Call getrandom() every generationNicholas Tay1-6/+3
Seems to hang every few executions if we getrandom one big chunk. Probably not enough entropy?
2021-12-02Add better RNG for LinuxNicholas Tay1-3/+19
2021-12-01Fix VLA for password charsNicholas Tay1-1/+2
I wasn't very clued in on how this works, and I thought it'd initialise properly, but clearly not. Need to include space for the null terminator and explicitly set it.
2021-12-01Add config file, refactor classes to be cleaner with macrosNicholas Tay1-20/+8
2021-12-01Missing string.h importNicholas Tay1-0/+1
2021-12-01Take a single argument as a grammarNicholas Tay1-1/+6
2021-12-01Take in triplet/specials/numbers argumentsNicholas Tay1-2/+32
2021-11-30Adjust seeding and compiler errorsNicholas Tay1-9/+6