V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m19s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-06 16:39:46 +01:00
parent 6785013692
commit 2e4e403b19
6 changed files with 127 additions and 21 deletions

View File

@@ -13,15 +13,14 @@
guard_sourcing
#######################################
# Generates salt.
# Generates a 16-byte salt.
# Globals:
# ERR_GENERATE_SALT
# NL
# Arguments:
# None
# Returns:
# 0: on success
# ERR_GENERATE_SALT
# ERR_GENERATE_SALT: on failure
#######################################
generate_salt() {
declare var_salt=""
@@ -38,18 +37,20 @@ generate_salt() {
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f generate_salt
#######################################
# Reads and validates a secure one-line password file.
# Globals:
# ERR_READ_PASS_FILE
# VAR_DEBUG_TRACE
# Arguments:
# 1: Path to password file
# 2: Name of target variable (via nameref)
# Returns:
# 0: on success
# ERR_READ_PASS_FILE
# ERR_READ_PASS_FILE: on failure
#######################################
read_password_file() {
declare -r var_input_file="${1}"
@@ -106,4 +107,7 @@ read_password_file() {
return 0
}
### Prevents accidental 'unset -f'.
# shellcheck disable=SC2034
readonly -f read_password_file
# vim: number et ts=2 sw=2 sts=2 ai tw=128 ft=sh