updates.
[silc.git] / lib / silccore / id.c
index c531badce4cbe89208264f17be522a0a0371a42c..51e69badd0f189a7242095ed408d569ae28c4d3d 100644 (file)
@@ -131,3 +131,12 @@ unsigned int silc_id_get_len(SilcIdType type)
 
   return 0;
 }
+
+/* Duplicate ID data */
+
+void *silc_id_dup(void *id, SilcIdType type)
+{
+  int len = silc_id_get_len(type);
+  void *new = silc_calloc(1, len);
+  memcpy(new, id, len);
+}