version property

int get version

Gets the version number of the UUID.

Returns:

  • Version number (1, 3, 4, or 5)

Version Meanings

  • 1: Time-based UUID
  • 3: Name-based UUID using MD5 hashing
  • 4: Random or pseudo-random UUID
  • 5: Name-based UUID using SHA-1 hashing

Implementation

int get version => ((_mostSigBits >> 12) & BigInteger.fromInt(0x0F)).toInt();