summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/basic.el b/basic.el
index 7500fcb..54fb768 100644
--- a/basic.el
+++ b/basic.el
@@ -678,6 +678,15 @@ The remaining CONFIGS are evaluated after the package is loaded."
(require ,package-name)
,@configs))
+;;; UUID generation
+
+(defun durand-uuid ()
+ "Generate a kind of unique string."
+ (format
+ "<%s.%s@durand-emacs.local>"
+ (substring (secure-hash 'md5 (format-time-string "%x%X-%z")) 0 8)
+ (substring (secure-hash 'sha256 (format-time-string "%s%N")) 0 8)))
+
;;; Test internet connection
(defun durand-internet-on (&optional host)