Module nrf52840dk_test_kernel::test::sha256_test

source ·
Expand description

This tests a software SHA256 implementation.

This test uses a deferred call (for callbacks). It tries to hash ‘hello world’ and uses Digest::validate to check that the hash is correct.

The expected output is Sha256Test: Verification result: Ok(true)

This tests whether the SHA-256 hash of the string “hello hello hello hello hello hello hello hello hello hello hello hello “ hashes correctly. This string is 12 repetitions of “hello “, so is 72 bytes long. As SHA uses 64-byte/512 bit blocks, this verifies that multi-block hashes work correctly.

Statics§

Functions§