Tagged articles

SecureRandom

6 articles · Page 1 of 1
Programmer1970
Programmer1970
Nov 7, 2024 · Information Security

10 Practical Ways to Generate Random Passwords in Java

This article presents a collection of Java techniques—including Random, SecureRandom with Base64, ThreadLocalRandom, Collections.shuffle, third‑party libraries like Apache Commons and Guava, custom character sets, template‑based generation, and regex validation—to create secure random passwords with configurable length and complexity.

Base64GuavaRegex
0 likes · 15 min read
10 Practical Ways to Generate Random Passwords in Java
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.

SecureRandombackendjava
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.

SecureRandomcryptographyjava
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.

Math.randomRandom Number GenerationSecureRandom
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.

Math.randomRandom Number GenerationSecureRandom
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.

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