+++ /dev/null
-/*
- * Copyright (C) 2007-2008 Andre Noll <maan@systemlinux.org>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
-
-/** \file sha1.c Secure Hash Algorithm, provided by openssl. */
-
-#include "adu.h"
-#include <openssl/sha.h>
-
-/**
- * Compute the sha1 hash.
- *
- * \param data Pointer to the data to compute the hash value from.
- * \param len The length of \a data in bytes.
- * \param sha1 Result pointer.
- *
- * \a sha1 must point to an area at least 20 bytes large.
- *
- * \sa sha(3), openssl(1).
- * */
-void sha1_hash(const char *data, unsigned long len, unsigned char *sha1)
-{
- SHA_CTX c;
- SHA1_Init(&c);
- SHA1_Update(&c, data, len);
- SHA1_Final(sha1, &c);
-}