Class ChronoHashID

java.lang.Object
io.fleetcoreplatform.Generators.ChronoHashID

public class ChronoHashID extends Object
Generates highly collision-resistant, temporally-sorted unique identifiers. The output relies on a combination of hardware MAC addresses, secure random nonces, and timestamping.
  • Constructor Details

    • ChronoHashID

      public ChronoHashID()
  • Method Details

    • generateCHID

      public static String generateCHID() throws SocketException, NoSuchAlgorithmException
      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.