Skip to content

Commit

Permalink
only use ulid charset
Browse files Browse the repository at this point in the history
  • Loading branch information
michel-tricot committed May 7, 2024
1 parent 2ebe47e commit 66ed0eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion abctl_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ _extract_value() {
_unique_id() {
# looks like a ulid but the time piece is in ascii instead of 48 bits encoded
local time="$(date +"%s000" | head -c 10)"
local rand="$(LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | head -c 16)"
local rand="$(LC_ALL=C tr -dc 0123456789ABCDEFGHJKMNPQRSTVWXYZ </dev/urandom | head -c 16)"
echo "${time}${rand}" | head -c 26
}

Expand Down

0 comments on commit 66ed0eb

Please sign in to comment.