MessageDigest digest = MessageDigest.getInstance("MD5");
digest.update(addr.getAddress());
byte[] md5 = digest.digest();
byte[] fauxMac = new byte[6];
System.arraycopy(md5, 0, fauxMac, 0, Math.min(md5.length, fauxMac.length));
return makeType1UUID(ByteBuffer.wrap(UUIDGenerator.getInstance().generateTimeBasedUUID(new EthernetAddress(fauxMac)).toByteArray()));
}
catch (NoSuchAlgorithmException ex)
{
throw new RuntimeException("Your platform has no support for generating MD5 sums");
}