From 3a436924121456c1347acedac31c9e19b2893565 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 11 Mar 2015 17:53:07 +0100 Subject: password: add support for sha512 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- common/Kconfig | 4 ++++ common/password.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/common/Kconfig b/common/Kconfig index 258a9757c9..200423a923 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -449,6 +449,10 @@ config PASSWD_SUM_SHA256 bool "SHA256" select SHA256 +config PASSWD_SUM_SHA512 + bool "SHA512" + select SHA512 + endchoice endif diff --git a/common/password.c b/common/password.c index 4c33152dbe..6ecf7177f0 100644 --- a/common/password.c +++ b/common/password.c @@ -33,6 +33,8 @@ #define PASSWD_SUM "sha1" #elif defined(CONFIG_PASSWD_SUM_SHA256) #define PASSWD_SUM "sha256" +#elif defined(CONFIG_PASSWD_SUM_SHA512) +#define PASSWD_SUM "sha512" #endif int password(unsigned char *passwd, size_t length, int flags, int timeout) -- cgit v1.2.3