/* sha1_vector - SHA-1 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure  */
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
/* sha1_vector - SHA-1 hash for data vector @num_elem: Number of elements in the data vector @addr: Pointers to the data areas @len: Lengths of the data blocks @mac: Buffer for the hash Returns: 0 on success, -1 of failure  */
int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
{
	SHA1_CTX ctx;
	size_t i;
	SHA1Init(&ctx);
	for (i = 0; i < num_elem; i++)
		SHA1Update(&ctx, addr[i], len[i]);
	SHA1Final(mac, &ctx);
	return 0;
}