Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.gpg file's name value is not random #6

Open
plantroon opened this issue Jun 2, 2023 · 0 comments
Open

.gpg file's name value is not random #6

plantroon opened this issue Jun 2, 2023 · 0 comments

Comments

@plantroon
Copy link

plantroon commented Jun 2, 2023

I noticed that all the created keys have the same value in them, only the unix timestamp is different. It is due to this line of code. Unless you generate too many keys too fast, differentiating by the unix timestamp is enough, therefore this is more of a cosmetic problem but the random value there seems redundant at this point.

Adding for example std::srand(clock()) before calling rand() fixes the problem. I am not a C++ programmer therefore I don't know where best to add it. I put mine at the start of the main function which made the value after unix timestamp actually random.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant