Tagged articles
5 articles
Page 1 of 1
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jan 18, 2024 · Backend Development

Understanding Java's UUID.randomUUID() Implementation

This article examines the inner workings of Java's java.util.UUID class, detailing how UUID.randomUUID() generates version‑4 UUIDs using SecureRandom, the bitwise adjustments for version and variant fields, and the constructor logic that assembles the final 128‑bit identifier.

BackendJavaSecureRandom
0 likes · 9 min read
Understanding Java's UUID.randomUUID() Implementation
Java Backend Technology
Java Backend Technology
Nov 17, 2023 · Information Security

Why Java’s Random Is Insecure and How SecureRandom Saves Your Data

The article explains that Java’s Random class uses a predictable linear‑congruential generator, making its output vulnerable to seed‑guessing attacks, and demonstrates how SecureRandom with strategies like SHA1PRNG, NativePRNGBlocking, and NativePRNGNonBlocking provides stronger, non‑predictable randomness suitable for security‑critical applications.

JavaSecureRandomcryptography
0 likes · 12 min read
Why Java’s Random Is Insecure and How SecureRandom Saves Your Data
macrozheng
macrozheng
Jun 25, 2021 · Fundamentals

Mastering Java Random Number Generation: Random, ThreadLocalRandom, SecureRandom & Math

This article reviews four Java random number generation techniques—Random, ThreadLocalRandom, SecureRandom, and Math.random()—detailing their usage, underlying algorithms, thread‑safety, performance trade‑offs, and appropriate scenarios, helping developers choose the right tool for their applications.

JavaMath.randomRandom Number Generation
0 likes · 15 min read
Mastering Java Random Number Generation: Random, ThreadLocalRandom, SecureRandom & Math
Programmer DD
Programmer DD
Dec 18, 2020 · Backend Development

Master Java Random Generators: Math.random, Random, ThreadLocalRandom & SecureRandom

This article explains how Java's random number utilities—Math.random, java.util.Random, ThreadLocalRandom, and SecureRandom—work, covering their algorithms, thread‑safety, usage examples, code snippets, and when to prefer cryptographically secure generators for security‑critical applications.

JavaMath.randomRandom Number Generation
0 likes · 10 min read
Master Java Random Generators: Math.random, Random, ThreadLocalRandom & SecureRandom
Programmer DD
Programmer DD
Oct 8, 2019 · Backend Development

Why Java’s Random Can Fail You: Secure and Thread‑Safe Alternatives Explained

This article examines how Java's built‑in Random class works, its predictability and thread‑contention issues, and why SecureRandom and ThreadLocalRandom are essential for security‑critical or high‑concurrency scenarios, helping developers avoid common pitfalls when generating random numbers.

JavaSecureRandomThreadLocalRandom
0 likes · 5 min read
Why Java’s Random Can Fail You: Secure and Thread‑Safe Alternatives Explained