What's the purpose of CSHA256::Write and CSHA256::Finalize Looking at Bitcoin Core implementation of SHA256, I noticed it was a bit different from OpenSSL's implementation.

In OpenSSL, you would initialize a variable with SHA256_CTX when in Bitcoin Core it's done with either valtype (aka. std::vector&lt;unsigned char&gt;) or uint256. Also, you would go through the steps INIT, Update, Final.

In Bitcoin Core, it's Write and Finalize.

It would be awesome if someone could go through the basic steps and perhaps explain why it's implemented differently. Thank you!
CSHA256 itself mimics OpenSSL's SHA256_CTX, and its constructor mimics the Init function. The Write method corresponds to the Update function. The Finalize method matches the Final function.

In short: you construct a CSHA256 object, call Write any number of times to feed it bytes to hash, and then call Finalize to compute the resulting hash.