Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor

Christian Bauer20130c44a9bc
diff --git a/container/src/main/java/org/openremote/container/util/UniqueIdentifierGenerator.java b/container/src/main/java/org/openremote/container/util/UniqueIdentifierGenerator.java
index ace2719e8..e1523f905 100644
--- a/container/src/main/java/org/openremote/container/util/UniqueIdentifierGenerator.java
+++ b/container/src/main/java/org/openremote/container/util/UniqueIdentifierGenerator.java
@@ -64,4 +64,11 @@ public class UniqueIdentifierGenerator implements IdentifierGenerator {
public static String generateId(String name) {
return Url62.encode(nameGenerator.generate(name));
}
+
+ /**
+ * Generates the same UUID value encoded as Base62, 22 characters long, if the bytes are given.
+ */
+ public static String generateId(byte[] bytes) {
+ return Url62.encode(nameGenerator.generate(bytes));
+ }
}