8 #ifndef META_OCEAN_IO_SIGNATURE_H
9 #define META_OCEAN_IO_SIGNATURE_H
33 static unsigned int crc32(
const unsigned char* buffer,
const size_t bufferSize);
43 static void md5(
const unsigned char* buffer,
const size_t bufferSize,
unsigned char hash[16]);
51 static void sha1(
const unsigned char* buffer,
const size_t bufferSize,
unsigned char hash[20]);
61 static void hmacSHA1(
const unsigned char* buffer,
const size_t bufferSize,
const unsigned char* key,
const size_t keySize,
unsigned char hash[20]);
65 #if defined(OCEAN_PLATFORM_BUILD_APPLE_MACOS) || defined(OCEAN_PLATFORM_BUILD_WINDOWS)
76 static inline bool evaluateCodeSignature(
const std::wstring& filePath,
bool& trustedCodeSignature, std::wstring* subjectName);
82 #ifdef OCEAN_PLATFORM_BUILD_APPLE_MACOS
97 #ifdef OCEAN_PLATFORM_BUILD_WINDOWS
123 #if defined(OCEAN_PLATFORM_BUILD_APPLE_MACOS) || defined(OCEAN_PLATFORM_BUILD_WINDOWS)
127 #ifdef OCEAN_PLATFORM_BUILD_WINDOWS
131 #elif defined(OCEAN_PLATFORM_BUILD_APPLE_MACOS)
This class implements functions allowing to sign data or to provide hash values for data.
Definition: Signature.h:24
static void hmacSHA1(const unsigned char *buffer, const size_t bufferSize, const unsigned char *key, const size_t keySize, unsigned char hash[20])
Determines the keyed hash message authentication code using SHA1 for a specified data buffer and secr...
static void md5(const unsigned char *buffer, const size_t bufferSize, unsigned char hash[16])
Determines the MD5 hash for a specified data buffer.
static bool evaluateCodeSignatureAppleMacos(const std::wstring &filePath, bool &trustedCodeSignature, std::wstring *subjectName)
Evaluates if the code signature of the specified file exists and is trusted by the certificate store ...
static unsigned int crc32(const unsigned char *buffer, const size_t bufferSize)
Determines the CRC32 hash for a specified data buffer.
static bool determineSignatureSubjectName(const std::wstring &filePath, std::wstring &subjectName)
Returns the subject name of the digital signature for the specified file.
static void sha1(const unsigned char *buffer, const size_t bufferSize, unsigned char hash[20])
Determines the SHA1 hash for a specified data buffer.
static bool evaluateCodeSignatureWindows(const std::wstring &filePath, bool &trustedCodeSignature, std::wstring *subjectName)
Evaluates if the code signature of the specified file exists and is trusted by the certificate store ...
static bool evaluateCodeSignature(const std::wstring &filePath, bool &trustedCodeSignature, std::wstring *subjectName)
Evaluates if the code signature of the specified file exists and is trusted by the platform-specfic c...
Definition: Signature.h:125
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15