CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
sha256_unit_tests Namespace Reference

Variables

int NUM_TESTS = 20
 
list random_strings = []
 
list lines = []
 
 hash_bytes = hashlib.sha256(bytes(random_strings[i], "utf8")).digest()
 
str hex_values = ", ".join(f"0x{byte:02x}" for byte in hash_bytes)
 
str expected = f"static const uint8_t random_expected_{i}[] = " + "{" + hex_values + "};"
 

Variable Documentation

◆ expected

str sha256_unit_tests.expected = f"static const uint8_t random_expected_{i}[] = " + "{" + hex_values + "};"

◆ hash_bytes

sha256_unit_tests.hash_bytes = hashlib.sha256(bytes(random_strings[i], "utf8")).digest()

◆ hex_values

str sha256_unit_tests.hex_values = ", ".join(f"0x{byte:02x}" for byte in hash_bytes)

◆ lines

list sha256_unit_tests.lines = []

◆ NUM_TESTS

int sha256_unit_tests.NUM_TESTS = 20

◆ random_strings

list sha256_unit_tests.random_strings = []