|
|
|
SHA1Digest.HGo to the documentation of this file.00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. 00006 \\/ M anipulation | 00007 ------------------------------------------------------------------------------- 00008 License 00009 This file is part of OpenFOAM. 00010 00011 OpenFOAM is free software; you can redistribute it and/or modify it 00012 under the terms of the GNU General Public License as published by the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 option) any later version. 00015 00016 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00019 for more details. 00020 00021 You should have received a copy of the GNU General Public License 00022 along with OpenFOAM; if not, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::SHA1Digest 00027 00028 Description 00029 The SHA1 message digest. 00030 00031 SeeAlso 00032 Foam::SHA1 00033 00034 SourceFiles 00035 SHA1Digest.C 00036 00037 \*---------------------------------------------------------------------------*/ 00038 00039 #ifndef SHA1Digest_H 00040 #define SHA1Digest_H 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // Forward declaration of classes 00048 class Ostream; 00049 00050 // Forward declaration of friend functions and operators 00051 class SHA1; 00052 class SHA1Digest; 00053 Ostream& operator<<(Ostream&, const SHA1Digest&); 00054 00055 00056 /*---------------------------------------------------------------------------*\ 00057 Class SHA1Digest Declaration 00058 \*---------------------------------------------------------------------------*/ 00059 00060 class SHA1Digest 00061 { 00062 public: 00063 friend class SHA1; 00064 00065 //- The length of the digest contents 00066 static const unsigned length = 20; 00067 00068 //- Construct a zero digest 00069 SHA1Digest(); 00070 00071 //- Reset the digest to zero 00072 void clear(); 00073 00074 //- Equality operator 00075 bool operator==(const SHA1Digest&) const; 00076 00077 //- Inequality operator 00078 bool operator!=(const SHA1Digest&) const; 00079 00080 friend Ostream& operator<<(Ostream&, const SHA1Digest&); 00081 00082 private: 00083 00084 //- The digest contents 00085 unsigned char v_[length]; 00086 }; 00087 00088 00089 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00090 00091 } // End namespace Foam 00092 00093 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00094 00095 #endif 00096 00097 // ************************************************************************* // |