diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2018-07-24 16:24:23 -0400 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2018-07-24 16:24:23 -0400 |
| commit | ca6b8577754558ed790dd305d9579d7d5ed72091 (patch) | |
| tree | f4aef8def509710b9e5a73ca4fb7105e439636a8 /include/PasswordCrypt.h | |
| parent | 3802e1ad5adf91f955b9f1408950e28bad10d830 (diff) | |
| parent | f892ac66084ab0315adb0c52e4a39b518730d023 (diff) | |
| download | efi-boot-shim-ca6b8577754558ed790dd305d9579d7d5ed72091.tar.gz efi-boot-shim-ca6b8577754558ed790dd305d9579d7d5ed72091.zip | |
Update upstream source from tag 'upstream/15+1531942534.dd3230d'
Update to upstream version '15+1531942534.dd3230d'
with Debian dir 8b167be00338c76b0ddc9164059ce6090c274641
Diffstat (limited to 'include/PasswordCrypt.h')
| -rw-r--r-- | include/PasswordCrypt.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/PasswordCrypt.h b/include/PasswordCrypt.h new file mode 100644 index 00000000..cadad727 --- /dev/null +++ b/include/PasswordCrypt.h @@ -0,0 +1,27 @@ +#ifndef SHIM_PASSWORDCRYPT_H +#define SHIM_PASSWORDCRYPT_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 /* SHIM_PASSWORDCRYPT_H */ |
