Here you can find the source of generateUuid(String seed)
Parameter | Description |
---|---|
seed | The seed to use for generating the GUID |
public static UUID generateUuid(String seed)
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; import java.util.UUID; public class Main { /**/*w w w . j a v a 2 s . c o m*/ * Generates a GUID using a seed. This will generate the same GUID usign the same seed. * @param seed The seed to use for generating the GUID * @return A string representation of the GUID */ public static UUID generateUuid(String seed) { try { return UUID.nameUUIDFromBytes(seed.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(String.format("UnsupportedEncodingException: %f", e.getMessage())); } } }