Package io.fleetcoreplatform.Generators
Class ChronoHashID
java.lang.Object
io.fleetcoreplatform.Generators.ChronoHashID
Generates highly collision-resistant, temporally-sorted unique identifiers. The output relies on
a combination of hardware MAC addresses, secure random nonces, and timestamping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringSynthesizes a chronologically sortable hash ID string.
-
Constructor Details
-
ChronoHashID
public ChronoHashID()
-
-
Method Details
-
generateCHID
Synthesizes a chronologically sortable hash ID string. The prefix contains the current epoch time, while the suffix is a SHA-256 hash of the local hardware MAC combined with a 15-character secure random sequence.- Returns:
- The generated unique identifier.
- Throws:
SocketException- If hardware network interfaces cannot be accessed.NoSuchAlgorithmException- If the runtime environment lacks SHA-256 support.
-