Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00032
00033 #pragma once
00034
00035 #include "../api_core.h"
00036 #include "../System/cl_platform.h"
00037 #include "../Text/string_types.h"
00038 #include "../Math/sha1.h"
00039
00043 class CL_API_CORE CL_HashFunctions
00044 {
00047
00048 public:
00049
00053
00054 public:
00055
00059
00060 public:
00062 static cl_ubyte32 crc32(const void *data, int size, cl_ubyte32 running_crc=0);
00063
00065 static cl_ubyte32 adler32(const void *data, int size, cl_ubyte32 running_adler32=0);
00066
00068 static CL_String8 sha1(const void *data, int size, bool uppercase = false);
00069
00076 static CL_String8 sha1(const CL_StringRef8 &data, bool uppercase = false);
00077
00084 static CL_String8 sha1(const CL_DataBuffer &data, bool uppercase = false);
00085
00091 static void sha1(const void *data, int size, unsigned char out_hash[20]);
00092
00097 static void sha1(const CL_StringRef8 &data, unsigned char out_hash[20]);
00098
00103 static void sha1(const CL_DataBuffer &data, unsigned char out_hash[20]);
00104
00108
00109 private:
00111 };
00112