mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 11:48:51 +00:00
- Init Autotest. Not using DejaGNU since there won't be many interactive testing. - Add basic test cases for the utility library (hash and prng).
17 lines
551 B
Text
17 lines
551 B
Text
#
|
|
# Copyright (C) 2025 CismonX <admin@cismon.net>
|
|
#
|
|
# Copying and distribution of this file, with or without modification, are
|
|
# permitted in any medium without royalty, provided the copyright notice and
|
|
# this notice are preserved. This file is offered as-is, without any warranty.
|
|
#
|
|
|
|
rand_u64_hex() {
|
|
echo $(od -vAn -N8 -tx8 /dev/urandom | tr -d ' ')
|
|
}
|
|
|
|
rand_base64() {
|
|
# The `base64` utility is not specified by POSIX,
|
|
# but present in GNU Coreutils, BusyBox and FreeBSD base system.
|
|
echo $(head -c$1 /dev/urandom | base64 -w0)
|
|
}
|