1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

cryptsuite: test hardware and software SHA, if possible.

Like the AES code before it, I've now exposed the explicit _sw and _hw
vtables for SHA-256 and SHA-1 through the testcrypt system, and now
cryptsuite will run the standard test vectors for those hashes over
both implementations, on a platform where more than one is available.
This commit is contained in:
Simon Tatham
2019-01-23 18:54:12 +00:00
parent 9285c1b93c
commit ba4eeff9cb
3 changed files with 90 additions and 53 deletions

View File

@ -115,7 +115,7 @@ FUNC3(void, ecc_edwards_get_affine, val_epoint, out_val_mpint, out_val_mpint)
* ssh_hash_update is an invention of testcrypt, handled in the real C
* API by the hash object also functioning as a BinarySink.
*/
FUNC1(val_hash, ssh_hash_new, hashalg)
FUNC1(opt_val_hash, ssh_hash_new, hashalg)
FUNC1(val_hash, ssh_hash_copy, val_hash)
FUNC1(val_string, ssh_hash_final, consumed_val_hash)
FUNC2(void, ssh_hash_update, val_hash, val_string_ptrlen)