v5FromBytesBuffer method

List<int> v5FromBytesBuffer(
  1. String? namespace,
  2. Uint8List? name,
  3. List<int>? buffer, {
  4. V5Options? config,
  5. int offset = 0,
})

Generates a namespace & name-based version 5 UUID from binary data into a provided buffer

By default it will generate a string based on a provided uuid namespace and binary name data, and place the result into the provided buffer. The buffer will also be returned.

The namespace parameter is the UUID namespace (as a String). The name parameter is a Uint8List containing arbitrary binary data.

Optionally an offset can be provided with a start position in the buffer.

http://tools.ietf.org/html/rfc4122.html#section-4.4

Example: Generate two IDs in a single buffer

var myBuffer = new List(32);
var binaryData = Uint8List.fromList([0x01, 0x02, 0x03]);
uuid.v5FromBytesBuffer(Namespace.url.value, binaryData, myBuffer);
uuid.v5FromBytesBuffer(Namespace.url.value, binaryData, myBuffer, offset: 16);

Implementation

List<int> v5FromBytesBuffer(
  String? namespace,
  Uint8List? name,
  List<int>? buffer, {
  V5Options? config,
  int offset = 0,
}) {
  var result = v5FromBytes(namespace, name, config: config);
  return UuidParsing.parse(result, buffer: buffer, offset: offset);
}