# 第三期

## 文章​

### How SHA-256 Works Step-By-Step​

SHA-2（安全哈希算法2）是SHA-256的一部分，是最流行的哈希算法之一。在本文中，我们将进一步分解SHA 256加密算法的每个步骤，并手动完成一个真实示例。

Like we mentioned above, a cryptographic hash function generates a “fingerprint” for a given input string. For example, if we were to hash the entire text of JRR Tolkien’s “The Lord of The Rings” series using the SHA 256 algorithm, we would get a 256-bit output almost unique to that book’s text. If we changed even a single letter in the book, the output hash would be wildly different.

It’s worth noting that we say the output of a hash is “almost unique” because there are a finite number of output strings. After all, the output of SHA-256 is always 256 bits long, which means it has a fixed size. The number of possible inputs, however, is infinite, meaning some inputs will hash to the same output. When this happens, it’s called a “collision”, and it is nearly impossible.

### 为网站添加用户友好的深色模式支持​

「深色模式」更像是一个主题，即使在白天也可以使用。不论是为了在 OLED 屏幕上省电、亦或是减少白光刺激护眼、亦或是暗色模式对色盲用户更加友好，总之 macOS 率先提出了系统级的「暗色模式」、并在 WebKit 中增加了对应的 Media Query，而后 Chromium、Firefox 先后跟进，如今兼容 prefers-color-scheme 的浏览器占有率已经高达 81.82%。

### Making setInterval Declarative with React Hooks​

I think Hooks provide lower-level primitives than classes — but their beauty is that they enable us to compose and create better declarative abstractions.