I have a quick question
7:34
I am not a developer but I wanted to test a scenario. This is about secure RNG. I would like to have a jar file where it just System.out.println which tell which securerandom.source is being used with the current JRE this jar file is being run.
That means If I run this jar file java -jar myconfigOut.jar then it should be print to console something like
Secure Random file used = /dev/urandom (or /dev/random) <-- which ever value is being used in that JRE.
https://docs.oracle.com/javase/9/docs/api/java/security/SecureRandom.html
I quickly searched and grabbed the oracle library wiki but have no idea how to do this coding. I am sure it will be a simple couple of lines code if we know java.
How to do this ??
Well I have done some exhaustive searching and learnt quick basics of java in an hour and wrote a code that actually spits out the requirement. Here is the code below
And the output looks like as follows:
This is quite a naive code as I just skim through how to write java hello world and some other things and then wrote this simple code. I have to write the code and/or ask here because I couldn't find this requirement anywhere but my requirement is fulfilled and all good here.