paludis  Version 2.6.0
sha512.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, 2011 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_SHA512_HH
22 #define PALUDIS_GUARD_PALUDIS_UTIL_SHA512_HH 1
23 
24 #include <iosfwd>
25 #include <string>
27 #include <inttypes.h>
28 
29 /** \file
30  * Declarations for the SHA512 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  * SHA512 digest class.
43  *
44  * \ingroup g_digests
45  */
47  {
48  private:
49  uint64_t h0, h1, h2, h3, h4, h5, h6, h7;
50 
51  void PALUDIS_HIDDEN process_block(uint64_t *);
52 
53  public:
54  /**
55  * Constructor.
56  */
57  SHA512(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
Definition: sha512.hh:46
#define PALUDIS_HIDDEN
Definition: attributes.hh:60
#define PALUDIS_VISIBLE
Definition: attributes.hh:59