nameUuidFromBytes function

UuidValue nameUuidFromBytes(
  1. List<int> name
)

Static factory to retrieve a type 3(name based) UUID based on the given byte array. The same as java.util.UUID.nameUUIDFromBytes.

Implementation

UuidValue nameUuidFromBytes(List<int> name) {
  final bytes = md5.convert(name).bytes;
  bytes[6] = (bytes[6] & 0x0f) | 0x30;
  bytes[8] = (bytes[8] & 0x3f) | 0x80;
  return UuidValue.fromList(bytes);
}