v5FromBytesObj method

UuidValue v5FromBytesObj(
  1. String? namespace,
  2. Uint8List? name, {
  3. V5Options? config,
})

Generates a namespace & name-based version 5 UUID from binary data as a UuidValue object

By default it will generate a string based on a provided uuid namespace and binary name data, and will return a UuidValue object.

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

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

Example: UuidValue usage with binary data

var binaryData = Uint8List.fromList([0x01, 0x02, 0x03, 0x04]);
uuidValue = uuid.v5FromBytesObj(Namespace.url.value, binaryData);
// -> UuidValue(uuid: "81156b66-5dc6-5909-8842-89a96a29d3ba")

print(uuidValue) -> // -> '81156b66-5dc6-5909-8842-89a96a29d3ba'
uuidValue.toBytes() -> // -> [...]

Implementation

UuidValue v5FromBytesObj(String? namespace, Uint8List? name,
    {V5Options? config}) {
  return UuidValue.fromString(v5FromBytes(namespace, name, config: config));
}