2 * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
4 * Licensed under the GPL v2. For licencing details see COPYING.
7 /** \file sha1.c Secure Hash Algorithm, provided by openssl. */
10 #include <openssl/sha.h>
13 * Compute the sha1 hash.
15 * \param data Pointer to the data to compute the hash value from.
16 * \param len The length of \a data in bytes.
17 * \param sha1 Result pointer.
19 * \a sha1 must point to an area at least 20 bytes large.
21 * \sa sha(3), openssl(1).
23 void sha1_hash(const char *data
, unsigned long len
, unsigned char *sha1
)
27 SHA1_Update(&c
, data
, len
);