Changeset View
Changeset View
Standalone View
Standalone View
src/crypto/sha256.cpp
// Copyright (c) 2014 The Bitcoin Core developers | // Copyright (c) 2014 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "crypto/sha256.h" | #include "crypto/sha256.h" | ||||
#include "crypto/common.h" | #include "crypto/common.h" | ||||
#include <string.h> | #include <cstring> | ||||
// Internal implementation code. | // Internal implementation code. | ||||
namespace { | namespace { | ||||
/// Internal SHA-256 implementation. | /// Internal SHA-256 implementation. | ||||
namespace sha256 { | namespace sha256 { | ||||
uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { | uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { | ||||
return z ^ (x & (y ^ z)); | return z ^ (x & (y ^ z)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |