OpenCore
1.0.4
OpenCore Bootloader
|
#include "CryptoInternal.h"
Go to the source code of this file.
Functions | |
VOID | OcHashPasswordSha512 (IN CONST UINT8 *Password, IN UINT32 PasswordSize, IN CONST UINT8 *Salt, IN UINT32 SaltSize, OUT UINT8 *Hash) |
BOOLEAN | OcVerifyPasswordSha512 (IN CONST UINT8 *Password, IN UINT32 PasswordSize, IN CONST UINT8 *Salt, IN UINT32 SaltSize, IN CONST UINT8 *RefHash) |
Copyright (C) 2019, Download-Fritz. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file PasswordHash.c.
VOID OcHashPasswordSha512 | ( | IN CONST UINT8 * | Password, |
IN UINT32 | PasswordSize, | ||
IN CONST UINT8 * | Salt, | ||
IN UINT32 | SaltSize, | ||
OUT UINT8 * | Hash ) |
Hash Password and Salt into a PasswordHash. The used hash function is SHA-512, thus the caller must ensure RefHash is at least 64 bytes in size.
[in] | Password | The entered password to hash. |
[in] | PasswordSize | The size, in bytes, of Password. |
[in] | Salt | The cryptographic salt appended to Password on hash. |
[in] | SaltSize | The size, in bytes, of Salt. |
[in] | Hash | The SHA-512 hash of Password and Salt. |
Definition at line 17 of file PasswordHash.c.
BOOLEAN OcVerifyPasswordSha512 | ( | IN CONST UINT8 * | Password, |
IN UINT32 | PasswordSize, | ||
IN CONST UINT8 * | Salt, | ||
IN UINT32 | SaltSize, | ||
IN CONST UINT8 * | RefHash ) |
Verify Password and Salt against RefHash. The used hash function is SHA-512, thus the caller must ensure RefHash is at least 64 bytes in size.
[in] | Password | The entered password to verify. |
[in] | PasswordSize | The size, in bytes, of Password. |
[in] | Salt | The cryptographic salt appended to Password on hash. |
[in] | SaltSize | The size, in bytes, of Salt. |
[in] | RefHash | The SHA-512 hash of the reference password and Salt. |
Definition at line 69 of file PasswordHash.c.