/**
* Implementation of the basic RFC4122 algorithms.
*
- * @see https://datatracker.ietf.org/doc/html/rfc4122
+ * @see "https://datatracker.ietf.org/doc/html/rfc4122"
*/
public abstract class AbstractUuidFactory implements UuidFactory {
return UuidBinaryUtils.fromBytes(arr);
}
- /*
- * SPI UTILITIES
- */
- /** Guarantees that a byte array of length 6 will be returned. */
- protected static byte[] toNodeIdBytes(byte[] source, int offset) {
- if (source == null)
- return null;
- if (offset < 0 || offset + 6 > source.length)
- throw new ArrayIndexOutOfBoundsException(offset);
- byte[] nodeId = new byte[6];
- System.arraycopy(source, offset, nodeId, 0, 6);
- return nodeId;
- }
-
- /**
- * Force this node id to be identified as no MAC address.
- *
- * @see https://datatracker.ietf.org/doc/html/rfc4122#section-4.5
- */
- protected static void forceToNoMacAddress(byte[] nodeId, int offset) {
- assert nodeId != null && offset < nodeId.length;
- nodeId[offset] = (byte) (nodeId[offset] | 1);
- }
-
/*
* DIGEST UTILITIES
*/