# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 23
# self = https://watcher.sour.is/conv/336uidq
If we stuck with Blake2b for Twt Hash(es); what do we think we need to reasonably go to in bit length/size?

=> https://gist.mills.io/prologic/194993e7db04498fa0e8d00a528f7be6

e.g: (_turns out @xuu is right about Blak2b being easy/simple too!_):


$ printf "%s\t%s\t%s" "https://example.com/twtxt.txt" "2024-09-29T13:30:00Z" "Hello World!" | b2sum -l 32 -t | awk '{ print $1 }'
7b8b79dd
=
If we stuck with Blake2b for Twt Hash(es); what do we think we need to reasonably go to in bit length/size?

=> https://gist.mills.io/prologic/194993e7db04498fa0e8d00a528f7be6

e.g: (_turns out @xuu is right about Blak2b being easy/simple too!_):


$ printf "%s\t%s\t%s" "https://example.com/twtxt.txt" "2024-09-29T13:30:00Z" "Hello World!" | b2sum -l 32 -t | awk '{ print $1 }'
7b8b79dd
=
@prologic I was about to post the same a few days ago, but b2sum is a GNU thing and not available on OpenBSD, for example.
@prologic I was about to post the same a few days ago, but b2sum is a GNU thing and not available on OpenBSD, for example.
@prologic I was about to post the same a few days ago, but b2sum is a GNU thing and not available on OpenBSD, for example.
@prologic I was about to post the same a few days ago, but b2sum is a GNU thing and not available on OpenBSD, for example.
@movq is that the only system is not available on? Are there alternative packages for OpenBSD?
@movq is that the only system is not available on? Are there alternative packages for OpenBSD?
@prologic the resultant hash doesn't look anything close to the hashes being used today. Is b2sum generating something else, or what?
@bender Not sure. It might be a slight variant. I'll find out 🙃
@bender Not sure. It might be a slight variant. I'll find out 🙃
@prologic I’m sure you can *somehow* install *something* that calculates blake2b on OpenBSD. But it’s not part of the base system as a standalone CLI tool, there only appear to be Perl modules for it. The other SHA tools do exist.
@prologic I’m sure you can *somehow* install *something* that calculates blake2b on OpenBSD. But it’s not part of the base system as a standalone CLI tool, there only appear to be Perl modules for it. The other SHA tools do exist.
@prologic I’m sure you can *somehow* install *something* that calculates blake2b on OpenBSD. But it’s not part of the base system as a standalone CLI tool, there only appear to be Perl modules for it. The other SHA tools do exist.
@prologic I’m sure you can *somehow* install *something* that calculates blake2b on OpenBSD. But it’s not part of the base system as a standalone CLI tool, there only appear to be Perl modules for it. The other SHA tools do exist.
@bender The example @prologic posted is missing the base32 dance and the length should be 256 instead of 32. This thing prints the correct hash:

printf '%s\\n%s\\n%s' 'https://example.com/twtxt.txt' '2020-12-09T15:38:42Z' 'The twt hash now uses the RFC 3339 timestamp format.' | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | sed -E 's/=//g; s/.*(.{7})$/\\1/' | tr '\n' '\n'

(xxd is part of Vim.)
@bender The example @prologic posted is missing the base32 dance and the length should be 256 instead of 32. This thing prints the correct hash:

printf '%s\n%s\n%s' 'https://example.com/twtxt.txt' '2020-12-09T15:38:42Z' 'The twt hash now uses the RFC 3339 timestamp format.' | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | sed -E 's/=//g; s/.*(.{7})$/\1/' | tr '[A-Z]' '[a-z]'

(xxd is part of Vim.)
@bender The example @prologic posted is missing the base32 dance and the length should be 256 instead of 32. This thing prints the correct hash:

printf '%s\n%s\n%s' 'https://example.com/twtxt.txt' '2020-12-09T15:38:42Z' 'The twt hash now uses the RFC 3339 timestamp format.' | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | sed -E 's/=//g; s/.*(.{7})$/\1/' | tr '[A-Z]' '[a-z]'

(xxd is part of Vim.)
@bender The example @prologic posted is missing the base32 dance and the length should be 256 instead of 32. This thing prints the correct hash:

printf '%s\n%s\n%s' 'https://example.com/twtxt.txt' '2020-12-09T15:38:42Z' 'The twt hash now uses the RFC 3339 timestamp format.' | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | sed -E 's/=//g; s/.*(.{7})$/\1/' | tr '[A-Z]' '[a-z]'

(xxd is part of Vim.)
@bender The example @prologic posted is missing the base32 dance and the length should be 256 instead of 32. This thing prints the correct hash:

printf '%s\\n%s\\n%s' 'https://example.com/twtxt.txt' '2020-12-09T15:38:42Z' 'The twt hash now uses the RFC 3339 timestamp format.' | b2sum -l 256 | awk '{ print $1 }' | xxd -r -p | base32 | sed -E 's/=//g; s/.*(.{7})$/\\1/' | tr '[A-Z]' '[a-z]'

(xxd is part of Vim.)
@movq that is it! Thank you! In comparison, sha256sum is much less complicated. :-D
@bender To be fair it _really_ isn't sha256sum vs. b2sum. Neither is more complicated than the other.
@bender To be fair it _really_ isn't sha256sum vs. b2sum. Neither is more complicated than the other.