Does Java SecureRandom.nextLong() return all possible values given it inherits from Random which uses only 48 bits? If not, can I still do it in Java maybe by modifying the Random class and how to do it? I just want to use an all random long number generator where all possible long values can be returned, if possible.
How to generate all possible 64 bit random values in java?
1.3k Views Asked by mj1261829 At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in RANDOM
- issue in my if statement to make comparison in my java program
- Interesting random PHP include issue
- Why do the random number crashes my Android app?
- Unique random character generator
- I made a for loop to swap two indiv char variables in a string
- List with random numbers in Haskell
- Randomly sample lines retaining commented header lines
- How do you generate specific random number?
- Randomizing values accounting for floating point resolution
- Python random use both state and seed?
- Random without repetition?
- How to produce multiple output files with a single input file using the command 'np.random.normal'?
- Generate random ROWID
- Random number generator problems
- How to take same random sample from dataset every time
Related Questions in GENERATOR
- Difference between list() and dict() with generators
- Python: Variable scope for nested generator expression
- Yeoman Generator - utils is not defined
- Random Numbers Generator based on Current Time and Birth Date
- Stop middleware pipeline execution in KOA
- Linear congruential generator in C++
- How can I restart a string iterator endlessly?
- Trying to return 'datetime.date' instead using yield
- How to unzip an iterator?
- Custom List data structure implementing SequenceType with using of GeneratorOf struct
- Why does my program give me the excess output? C program
- How Load xmlHttpRequest resources inline/sequentially with ES6 Promises & Generators?
- Using python iterators to recursively list files in a folder
- Using generator to cycle through numbers in a list
- JavaScript Prime Number
Related Questions in LONG-INTEGER
- Is "long long" = "long long int" = "long int long" = "int long long"?
- Point out potential overflow bugs
- C++ unsigned long doesn't wrap around after 4294967295
- Long.parseLong Error
- Android PdfRenderer class - Too long to render on few PDFs
- Long tap recognizer in Sprite Kit with swift
- How does int(or long long) overflow in c++ affect modulus?
- Convert String to Long using BufferReader
- Is there any way to set C++ long type size with 8 bytes (x64)?
- int(primitive) value not getting typecasted to long(primitive) implicitly
- JPQL: cast Long to String to perform LIKE search
- Should a java method accepting long value accept a Integer object?
- Trying to prevent overflow when adding two longs
- Unable to convert String to Long in Velocity Template
- Why the default resultType of MyBatis countByExample is java.lang.Long
Related Questions in SECURE-RANDOM
- Generate random number in range with SecRandomCopyBytes
- Why does the BigInteger.isProbablePrime() function in Java return true for negative numbers?
- HMAC_DRBG algorithm for Java SecureRandom: only possible in Java 9?
- Does the KeyPairGenerator class behave differently in Java 1.6 and Java 1.8?
- Use a dynamically-generated, random IV | SecureRandom unable to decrypt the encrypted values
- SecureRandom stream weird behavior with multiple threads
- How to access SecureRandom in jsbn typescript?
- Seed to java.security.SecureRandom on Windows os
- How to use SecureRandom output in a byte array properly?
- Generating Predictable Secure Random Numbers
- How to use SecureRandom instead of using hardcoded bytes array for Java AES Encrytion and Decryption?
- RandomUUID in UUID operators code explanation
- Java SecureRandom generate URL like Medium.com (Random 12 characters)
- Generating random number of length 6 with SecureRandom in Ruby
- secure random seed and derby database creation
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
While SecureRandom inherits from Random, it doesn't use the same maths or have the same limitation. It will produce all possible 64-bit values eventually.
This class delegates to one of many possible implementations. You can select one by calling
SecureRandom.getInstance(algorithm)Note: some implementations use entropy in your computer to make the results random, rather than purely pseudo random.
SecureRandom doesn't use any of the methods of it's parent e.g.
This method delegates to a completely different implementation.
Related link How to solve slow Java `SecureRandom`? due to using /dev/random