aes: use integer types with explicit size

An int is just at least 16 bytes long and not 32 bytes on all systems.
Here we need integers with an explicit size therefor we should use
uint**_t. This makes the code compile for a 16 bit CPU.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: use functions to extract numbers

These defines did not had a good type check in it and just casted the
parameters. This caused problems on 16 bit CPUs as there int is 16 bits
and the default value for numbers. Now the compiler is able to change
the given integer to the needed size. This also fixes 2 bugs where the
wrong pointer was used in the code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
ecc: fix bug when using this on 16Bit CPU

There is an integer overflow as int is 16 bits on 16Bit CPUs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
debug: fix bug when using this on 16Bit CPU

There is an integer overflow as int is 16 bits on 16Bit CPUs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
sha2: fix compilation without assert().

It was not possible to compile sha2 code without using assert().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
sha2: undef BYTE_ORDER before using

some contiki targets are defining BYTE_ORDER somewhere else and this
conflicts with this definition.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>