File indexing completed on 2026-04-09 07:49:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #pragma once
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039 #include "sdigest.h"
0040 #include <string>
0041 #include <vector>
0042 #include "plog/Severity.h"
0043 #include "SYSRAP_API_EXPORT.hh"
0044
0045 class SYSRAP_API SDigest
0046 {
0047 static const plog::Severity LEVEL ;
0048 public:
0049 static const char* hexchar ;
0050 static bool IsDigest(const char* s);
0051
0052 static std::string DigestPathInByteRange(const char* path, int i0, int i1, unsigned bufsize=8192);
0053 static std::string DigestPath(const char* path, unsigned bufsize=8192);
0054 static std::string DigestPath2(const char* path);
0055
0056 static const char* md5digest_( const char* buffer, int len );
0057 static std::string md5digest( const char* buffer, int len );
0058 static std::string digest( void* buffer, int len );
0059 static std::string digest( std::vector<std::string>& ss);
0060 static std::string digest_skipdupe( std::vector<std::string>& ss);
0061
0062 static std::string Buffer(const char *buffer, int length) ;
0063
0064 public:
0065 SDigest();
0066 virtual ~SDigest();
0067 public:
0068 void update( char* buffer, int length);
0069 void update_str( const char* str );
0070 void update( const std::string& str );
0071 char* finalize();
0072 private:
0073
0074 #if defined(__GNUC__) || defined(__clang__)
0075 #pragma GCC diagnostic push
0076 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
0077 #endif
0078 MD5_CTX m_ctx ;
0079 #if defined(__GNUC__) || defined(__clang__)
0080 #pragma GCC diagnostic pop
0081 #endif
0082
0083
0084 };
0085
0086
0087
0088