// Linux 替身:CommonCrypto/CommonDigest.h —— 实际定义见 compat_linux.h(-include 强制先含) // Linux stand-in: CommonCrypto/CommonDigest.h -- the actual definitions are in compat_linux.h (force-included with -include) #pragma once #include typedef uint32_t CC_LONG; #define CC_MD5_DIGEST_LENGTH 16 #define CC_SHA1_DIGEST_LENGTH 20 #define CC_SHA256_DIGEST_LENGTH 32 typedef struct { uint32_t h[8]; uint64_t len; uint8_t buf[64]; uint32_t n; } CC_SHA256_CTX; unsigned char *CC_MD5(const void *data, CC_LONG len, unsigned char *md); unsigned char *CC_SHA1(const void *data, CC_LONG len, unsigned char *md); int CC_SHA256_Init(CC_SHA256_CTX *c); int CC_SHA256_Update(CC_SHA256_CTX *c, const void *data, CC_LONG len); int CC_SHA256_Final(unsigned char *md, CC_SHA256_CTX *c);