Package io.mosip.kernel.core.util
Class UUIDUtils
- java.lang.Object
-
- io.mosip.kernel.core.util.UUIDUtils
-
public class UUIDUtils extends Object
This class is used to generate UUID of Type 5.- Author:
- Bal Vikash Sharma
-
-
Field Summary
Fields Modifier and Type Field Description static UUIDNAMESPACE_DNSstatic UUIDNAMESPACE_OIDstatic UUIDNAMESPACE_URLstatic UUIDNAMESPACE_X500
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static UUIDgetUUID(UUID namespace, String name)This method takes UUIDnamespaceand anameand generate Type 5 UUID.static UUIDgetUUIDFromBytes(UUID namespace, byte[] name)This method takes UUIDnamespaceand anameas a byte array and generate Type 5 UUID.
-
-
-
Method Detail
-
getUUID
public static UUID getUUID(UUID namespace, String name)
This method takes UUIDnamespaceand anameand generate Type 5 UUID.- Parameters:
namespace- is theUUIDname- for which UUID needs to be generated.- Returns:
- type 5 UUID as per given
namespaceandname - Throws:
NullPointerException- when eithernamespaceornameis null.
-
getUUIDFromBytes
public static UUID getUUIDFromBytes(UUID namespace, byte[] name)
This method takes UUIDnamespaceand anameas a byte array and generate Type 5 UUID.- Parameters:
namespace- is theUUIDname- is a byte array- Returns:
- type 5 UUID as per given
namespaceandname - Throws:
NullPointerException- when eithernamespaceornameis null.
-
-