Test a crypto calculation with a known vector
A repeatable way to check keys, encodings, padding and expected outputs before troubleshooting an integration.
A known test vector gives you inputs and an expected output. It is a better starting point for troubleshooting than a random key and an unexplained ciphertext: you can reproduce the calculation and change one setting at a time.
Begin with an exact match
In Hashes, select SHA-256, choose ASCII and enter Hello, with a capital H and no newline. The expected digest is:
185F8DB32271FE25F561A6FC938B2E264306EC304EDA518007D1764826381969 Now select HEX and enter 48 65 6C 6C 6F. These are the same five bytes, so the digest should match. Entering the literal ASCII characters 48656C6C6F instead hashes ten different bytes.
Record every setting
For encryption, keep the algorithm, key length, mode, IV or nonce, padding and encoding together with the example. A correct key with the wrong padding can still produce the wrong ciphertext. Randomized operations can produce different outputs on each run, so compare the properties specified by the vector rather than assuming every operation is deterministic.
Check the reverse operation
When the tool supports it, decrypt the ciphertext with the matching settings and compare the recovered bytes. This checks the round trip, but two implementations can share the same mistake. Agreement with an independent vector provides stronger evidence.
Use a failing case too
Try an incomplete HEX byte or a key of the wrong length. The calculator should explain the input error rather than silently changing your data. Use synthetic keys and messages while experimenting, and keep the original vector available so you can return to a known starting point.