From db6f29e01a33d8ed8f127ff169d9f91d55e8a229 Mon Sep 17 00:00:00 2001 From: Otto Date: Sat, 7 Mar 2026 16:18:58 +0100 Subject: [PATCH] Second commit with fixed script --- generate-proof.sh | 6 ++++-- test.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 test.txt diff --git a/generate-proof.sh b/generate-proof.sh index e1ae44f..e97cfbb 100755 --- a/generate-proof.sh +++ b/generate-proof.sh @@ -21,9 +21,11 @@ generate_with_ots_cli() { local hash="$1" 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) - 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 ots stamp "$temp_file" -o "$output" diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..ed1eb04 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +# Test file