From dc62a3c4dc3dd590fbba32c46b717088a132eb5e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 19 Oct 2017 15:44:12 -0400 Subject: Move includes around to clean the source tree up a bit. Signed-off-by: Peter Jones --- include/PasswordCrypt.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 include/PasswordCrypt.h (limited to 'include/PasswordCrypt.h') diff --git a/include/PasswordCrypt.h b/include/PasswordCrypt.h new file mode 100644 index 00000000..b726f320 --- /dev/null +++ b/include/PasswordCrypt.h @@ -0,0 +1,27 @@ +#ifndef __PASSWORD_CRYPT_H__ +#define __PASSWORD_CRYPT_H__ + +enum HashMethod { + TRADITIONAL_DES = 0, + EXTEND_BSDI_DES, + MD5_BASED, + SHA256_BASED, + SHA512_BASED, + BLOWFISH_BASED +}; + +typedef struct { + UINT16 method; + UINT64 iter_count; + UINT16 salt_size; + UINT8 salt[32]; + UINT8 hash[128]; +} __attribute__ ((packed)) PASSWORD_CRYPT; + +#define PASSWORD_CRYPT_SIZE sizeof(PASSWORD_CRYPT) + +EFI_STATUS password_crypt (const char *password, UINT32 pw_length, + const PASSWORD_CRYPT *pw_hash, UINT8 *hash); +UINT16 get_hash_size (const UINT16 method); + +#endif /* __PASSWORD_CRYPT_H__ */ -- cgit v1.2.3