lib: add crypt subsystem
Add the basic functionality required to support the standard crypt
format.
The files crypt-sha256.c and crypt-sha512.c originate from libxcrypt and
their formatting is therefor retained.
The integration is done via a crypt_compare() function in crypt.c.
```
libxcrypt $ git describe --long --always --all
tags/v4.4.17-0-g6b110bc
```
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
diff --git a/test/Kconfig b/test/Kconfig
index ab3ac54..e15ba23 100644
--- a/test/Kconfig
+++ b/test/Kconfig
@@ -38,6 +38,16 @@
Enables a test which exercises asn1 compiler and decoder function
via various parsers.
+config UT_LIB_CRYPT
+ bool "Unit test for crypt-style password hashing"
+ depends on !SPL && AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
+ default y
+ select CRYPT_PW
+ select CRYPT_PW_SHA256
+ select CRYPT_PW_SHA512
+ help
+ Enables a test for the crypt-style password hash functions.
+
config UT_LIB_RSA
bool "Unit test for rsa_verify() function"
depends on RSA