paludis  Version 2.6.0
sha1.hh
Go to the documentation of this file.
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2006, 2007 Ciaran McCreesh
5  * Copyright (c) 2008 David Leverton
6  *
7  * This file is part of the Paludis package manager. Paludis is free software;
8  * you can redistribute it and/or modify it under the terms of the GNU General
9  * Public License version 2, as published by the Free Software Foundation.
10  *
11  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU General Public License along with
17  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18  * Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 #ifndef PALUDIS_GUARD_PALUDIS_UTIL_SHA1_HH
22 #define PALUDIS_GUARD_PALUDIS_UTIL_SHA1_HH 1
23 
24 #include <iosfwd>
25 #include <string>
26 #include <inttypes.h>
28 
29 /** \file
30  * Declarations for the SHA-1 digest class.
31  *
32  * \ingroup g_digests
33  *
34  * \section Examples
35  *
36  * - None at this time.
37  */
38 
39 namespace paludis
40 {
41  /**
42  * SHA-1 digest class.
43  *
44  * \ingroup g_digests
45  */
47  {
48  private:
49  uint32_t h0, h1, h2, h3, h4;
50 
51  void PALUDIS_HIDDEN process_block(uint32_t *);
52 
53  public:
54  /**
55  * Constructor.
56  */
57  SHA1(std::istream & stream);
58 
59  /**
60  * Our checksum, as a string of hex characters.
61  */
62  std::string hexsum() const;
63  };
64 }
65 
66 #endif
Definition: about_metadata-fwd.hh:23
#define PALUDIS_HIDDEN
Definition: attributes.hh:60
Definition: sha1.hh:46
#define PALUDIS_VISIBLE
Definition: attributes.hh:59