+# map a string into a hexadecimal number with 10-digits by folding the given string into 9-digit ascii-code numbers and adding them
+hexfoldsum() {
+ local V
+ V="$(b2sum -l 40 <<< "$1" | sed 's/\(..\)/\1:/g')"
+ echo "02:${V:0:14}"
+}
+
+# Generate a mac address for given interface by passing hostname,
+# subhost name and interface through 40-bit b2sum and with 02: prefix.