template_lib.c: Template assert should check the length of the formatted string as well.

Reported-by: Andras Mitzki <mitzkia@gmail.com>
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
cryptofuncs: Length shouldn't be larger than the message disgest length.

Reported-by: Andras Mitzki <mitzkia@gmail.com>
Signed-off-by: Viktor Tusa <tusavik@gmail.com>
Merge pull request #224 from talien/f/cryptofuncs-fix

F/cryptofuncs fix