What is Nostr?
Filippo Valsorda :go: /
npub1whz…kn2m
2024-10-09 10:03:37

Filippo Valsorda :go: on Nostr: Accumulated test vectors are a trick I’m very fond of: instead of checking in ...

Accumulated test vectors are a trick I’m very fond of: instead of checking in megabytes of known-answer tests, you generate the inputs deterministically, hash the outputs, and check the digest.

I’m finding it very effective to extensively and easily test Go cryptography packages.

It’s letting me run large randomized (e.g. covering all 2^-16 edge cases) or comprehensive (e.g. all possible input length combinations) tests I couldn’t have checked in otherwise.

https://words.filippo.io/accumulated/?source=Mastodon
Author Public Key
npub1whzyg92c6fsvpjjcnn504z0a2pfwenctp872sgmedqg2np4drj8qwakn2m