bcrypt password hashing function More...
Go to the source code of this file.
Macros | |
#define | BCRYPT_MIN_COST 3 |
#define | BCRYPT_MAX_COST 31 |
#define | BCRYPT_HASH_STRING_LEN 60 |
Functions | |
error_t | bcryptHashPassword (const PrngAlgo *prngAlgo, void *prngContext, uint_t cost, const char_t *password, char_t *hash, size_t *hashLen) |
Password hashing function. More... | |
error_t | bcryptVerifyPassword (const char_t *password, const char_t *hash) |
Password verification function. More... | |
error_t | bcrypt (uint_t cost, const uint8_t *salt, const char_t *password, char_t *hash, size_t *hashLen) |
bcrypt algorithm More... | |
error_t | eksBlowfishSetup (BlowfishContext *context, uint_t cost, const uint8_t *salt, size_t saltLen, const char_t *password, size_t passwordLen) |
Expensive key setup. More... | |
Detailed Description
bcrypt password hashing function
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file bcrypt.h.
Macro Definition Documentation
◆ BCRYPT_HASH_STRING_LEN
◆ BCRYPT_MAX_COST
◆ BCRYPT_MIN_COST
Function Documentation
◆ bcrypt()
error_t bcrypt | ( | uint_t | cost, |
const uint8_t * | salt, | ||
const char_t * | password, | ||
char_t * | hash, | ||
size_t * | hashLen | ||
) |
bcrypt algorithm
- Parameters
-
[in] cost Key expansion iteration count as a power of two [in] salt Random salt (16 bytes) [in] password NULL-terminated password to be encoded [out] hash NULL-terminated hash string [out] hashLen Length of the hash string (optional parameter)
- Returns
- Error code
◆ bcryptHashPassword()
error_t bcryptHashPassword | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
uint_t | cost, | ||
const char_t * | password, | ||
char_t * | hash, | ||
size_t * | hashLen | ||
) |
Password hashing function.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] cost Key expansion iteration count as a power of two [in] password NULL-terminated password to be encoded [out] hash NULL-terminated hash string [out] hashLen Length of the hash string (optional parameter)
- Returns
- Error code
◆ bcryptVerifyPassword()
◆ eksBlowfishSetup()
error_t eksBlowfishSetup | ( | BlowfishContext * | context, |
uint_t | cost, | ||
const uint8_t * | salt, | ||
size_t | saltLen, | ||
const char_t * | password, | ||
size_t | passwordLen | ||
) |
Expensive key setup.
- Parameters
-
[in] context Pointer to the Blowfish context [in] cost Key expansion iteration count as a power of 2 [in] salt Random salt [in] saltLen Length of the random salt, in bytes [in] password NULL-terminated password to be encoded [in] passwordLen Length of the password, in bytes
- Returns
- Error code