-
Notifications
You must be signed in to change notification settings - Fork 64
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
Move random string generation to one place #5950
Conversation
3cd64bd
to
f80183a
Compare
Wouldn't it be better to eliminate the function |
Creating a random string is a needed functionality in the application - why do you want to remove it? |
Yes, it is a needed functionality. But it does not require local functions when there is a library function |
Using |
f80183a
to
0625a06
Compare
0625a06
to
b13f8e3
Compare
b13f8e3
to
1a232e4
Compare
@stweil do you approve this pull request with the explanation given above by @henning-gerhardt ? |
Kitodo/src/test/java/org/kitodo/production/helper/HelperTest.java
Outdated
Show resolved
Hide resolved
Do we really need a cryptographically strong random number generator in class Then there remains a single location which still uses a secure random device. I am not sure whether it is required there, maybe it isn't. But at least there is no need for wrapper functions. |
1a232e4
to
abc83bf
Compare
The |
Why should tests use strong and secure random generator sources? I think that tests are even an example where such generator sources are undesired because they use resources (entropy) although there is no need for increased security in tests. In addition pseudo random generator sources have advantages for tests because they optionally allow reproducible tests if the same seed is used. |
Okay, then I will close this pull request as the change is not needed or not wanted. |
There was two places where random strings are created in two different ways. Instead of a self written solution on one place and a library usage this change move the library usage to a central place and replace the self written solution.