# Quiz 29

**Let's apply what you have learned so far to a specific scenario. Choose the most correct response (choose ALL that apply).**

You are implementing a SHA-256 hash function in GoLang. You receive an input message of 70 bytes. What steps should you take to ensure the message block is properly padded and meets the required length for processing?\
\
**Add answers and select the correct ones**

* [x] Add a '1' bit to the end of the message to denote the start of padding.
* [x] Add enough '0' bits to make the message length 64 bits short of a multiple of 512 bits.
* [ ] Add a '0' bit to the end of the message to denote the start of padding.
* [ ] Add enough '1' bits to make the message length 64 bits short of a multiple of 512 bits.<br>

**Note to Learners**\
\
To prepare the message for SHA-256 processing, you must first append a '1' bit to the end of the message to indicate the start of padding. Then, add '0' bits until the message length is 64 bits short of a multiple of 512 bits. This ensures the message block is properly formatted for further processing.

&#x20;

To learn more about it, you can follow the course [Walkthrough Implementation of SHA-256 in Golang](https://bsvblockchain.360learning.com/course/play/68bac07ee4056be2a5dd1108)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bitcoin-primitives-hash-functions/quiz-bitcoin-hash-functions/quiz-29.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
