lib: added sha1 on String

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
Merge: lib: added sha1 on String

Added function to compute the SHA-1 of a String in both its Binary and to hex form.

Pull-Request: #366
Reviewed-by: Jean Privat <jean@pryen.org>
lib/sha1: fix nitunit

Signed-off-by: Jean Privat <jean@pryen.org>