This is the documentation for the latest (main) development branch of HPM SDK. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

18.1. Guomi API Demo

18.1.1. Overview

The gm_api shows the results of running the basic ROM Guomi APIs.

18.1.2. Board Setting

No special settings are required

18.1.3. Running the example

When the example runs successfully, the API test result is displayed in the terminal:

sm4_api_ecb_demo, start...
SM4 ECB encryption start...
SM4 ECB encryption test passed!
SM4 ECB decryption start...
SM4 ECB decryption test passed!
SM4 ECB demo execution passed
sm4_api_cbc_demo, start...
SM4 CBC encryption start...
SM4 CBC encryption test passed!
SM4 CBC decryption start...
SM4 CBC decryption test passed!
SM4 CBC demo execution passed
sm3_api_demo(), start...
test1 started
test1 finished
test1 SM3 calculation passed
test2 started
test2 finished
test2 SM3 calculation passed
SM3 demo execution passed