1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/crypto/hash_simple.c

14 lines
315 B
C
Raw Normal View History

/*
* Convenience function to hash a single piece of data, wrapping up
* the faff of making and freeing an ssh_hash.
*/
#include "ssh.h"
void hash_simple(const ssh_hashalg *alg, ptrlen data, void *output)
{
ssh_hash *hash = ssh_hash_new(alg);
put_datapl(hash, data);
ssh_hash_final(hash, output);
}