Second commit with fixed script

This commit is contained in:
Otto 2026-03-07 16:18:58 +01:00
parent 392ee723c3
commit db6f29e01a
2 changed files with 5 additions and 2 deletions

View file

@ -21,9 +21,11 @@ generate_with_ots_cli() {
local hash="$1" local hash="$1"
local output="$2" local output="$2"
# Create a temporary file with the hash # Create a temporary file with the hash (convert hex to binary)
local temp_file=$(mktemp) local temp_file=$(mktemp)
echo -n "$hash" | xxd -r -p > "$temp_file"
# Use python3 for hex to binary conversion (more portable than xxd)
python3 -c "import sys; sys.stdout.buffer.write(bytes.fromhex('$hash'))" > "$temp_file"
# Generate timestamp # Generate timestamp
ots stamp "$temp_file" -o "$output" ots stamp "$temp_file" -o "$output"

1
test.txt Normal file
View file

@ -0,0 +1 @@
# Test file