Hello world example of using the hashing functions of mbed TLS. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-tls

SHA-256 Hash example on mbed OS

This application performs hashing of a buffer with SHA-256 using various APIs. It serves as a tutorial for the basic hashing APIs of mbed TLS.

Getting started

Building with mbed CLI

If you'd like to use mbed CLI to build this, then you should set up your environment if you have not done so already. For instructions, refer to the main readme. The instructions on this page relate to using the developer.mbed.org Online Compiler

Import the program in to the Online Compiler, select your board from the drop down in the top right hand corner and then compile the application. Once it has built, you can drag and drop the binary onto your device.

Monitoring the application

The output in the terminal window should be similar to this:

terminal output

Method 1: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
Method 2: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
Method 3: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
Method 4: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3

DONE
Committer:
mbed_official
Date:
Thu Jul 28 23:14:06 2016 +0100
Revision:
2:bdb7d32b8a2b
Child:
5:5ba54fdd4062
Update examples to use mbed-os-5.1.0-rc3.


Commit copied from ./src/github.com/ARMmbed/mbed-os-example-tls

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 2:bdb7d32b8a2b 1 # SHA-256 Hash example on mbed OS
mbed_official 2:bdb7d32b8a2b 2
mbed_official 2:bdb7d32b8a2b 3 This application performs hashing of a buffer with SHA-256 using various APIs. It serves as a tutorial for the basic hashing APIs of mbed TLS.
mbed_official 2:bdb7d32b8a2b 4
mbed_official 2:bdb7d32b8a2b 5 # Getting started
mbed_official 2:bdb7d32b8a2b 6
mbed_official 2:bdb7d32b8a2b 7 Set up your environment if you have not done so already. For instructions, refer to the [main readme](../README.md).
mbed_official 2:bdb7d32b8a2b 8
mbed_official 2:bdb7d32b8a2b 9 ## Monitoring the application
mbed_official 2:bdb7d32b8a2b 10
mbed_official 2:bdb7d32b8a2b 11 The output in the terminal window should be similar to this:
mbed_official 2:bdb7d32b8a2b 12
mbed_official 2:bdb7d32b8a2b 13 ```
mbed_official 2:bdb7d32b8a2b 14 Method 1: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
mbed_official 2:bdb7d32b8a2b 15 Method 2: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
mbed_official 2:bdb7d32b8a2b 16 Method 3: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
mbed_official 2:bdb7d32b8a2b 17 Method 4: 315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3
mbed_official 2:bdb7d32b8a2b 18
mbed_official 2:bdb7d32b8a2b 19 DONE
mbed_official 2:bdb7d32b8a2b 20 ```