diff --git a/src/crypto/sha256.cpp b/src/crypto/sha256.cpp --- a/src/crypto/sha256.cpp +++ b/src/crypto/sha256.cpp @@ -13,7 +13,7 @@ #if defined(USE_ASM) #include namespace sha256_sse4 { -void Transform(uint32_t *s, const unsigned char *chunk, size_t blocks); +void Transform(uint32_t *s, const uint8_t *chunk, size_t blocks); } #endif #endif @@ -65,7 +65,7 @@ /** Perform a number of SHA-256 transformations, processing 64-byte chunks. */ - void Transform(uint32_t *s, const unsigned char *chunk, size_t blocks) { + void Transform(uint32_t *s, const uint8_t *chunk, size_t blocks) { while (blocks--) { uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7]; @@ -215,11 +215,11 @@ } // namespace sha256 -typedef void (*TransformType)(uint32_t *, const unsigned char *, size_t); +typedef void (*TransformType)(uint32_t *, const uint8_t *, size_t); bool SelfTest(TransformType tr) { - static const unsigned char in1[65] = {0, 0x80}; - static const unsigned char in2[129] = { + static const uint8_t in1[65] = {0, 0x80}; + static const uint8_t in2[129] = { 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, diff --git a/src/crypto/sha256_sse4.cpp b/src/crypto/sha256_sse4.cpp --- a/src/crypto/sha256_sse4.cpp +++ b/src/crypto/sha256_sse4.cpp @@ -11,7 +11,7 @@ #if defined(__x86_64__) || defined(__amd64__) namespace sha256_sse4 { -void Transform(uint32_t *s, const unsigned char *chunk, size_t blocks) { +void Transform(uint32_t *s, const uint8_t *chunk, size_t blocks) { static const uint32_t K256 alignas(16)[] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, diff --git a/src/netaddress.cpp b/src/netaddress.cpp --- a/src/netaddress.cpp +++ b/src/netaddress.cpp @@ -16,8 +16,7 @@ static const uint8_t pchOnionCat[] = {0xFD, 0x87, 0xD8, 0x7E, 0xEB, 0x43}; // 0xFD + sha256("bitcoin")[0:5] -static const unsigned char g_internal_prefix[] = {0xFD, 0x6B, 0x88, - 0xC0, 0x87, 0x24}; +static const uint8_t g_internal_prefix[] = {0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24}; void CNetAddr::Init() { memset(ip, 0, sizeof(ip));