libmisc/salt.c: bcrypt should use $2b$ as prefix for setting.
This prefix is the recommended one for new bcrypt hashes for a long time. Signed-off-by: Björn Esser <besser82@fedoraproject.org>
This commit is contained in:
parent
7a3bb4d0ea
commit
738d92a4bd
@ -90,12 +90,8 @@ static void seedRNG (void)
|
|||||||
*/
|
*/
|
||||||
#define MAGNUM(array,ch) (array)[0]=(array)[2]='$',(array)[1]=(ch),(array)[3]='\0'
|
#define MAGNUM(array,ch) (array)[0]=(array)[2]='$',(array)[1]=(ch),(array)[3]='\0'
|
||||||
#ifdef USE_BCRYPT
|
#ifdef USE_BCRYPT
|
||||||
/*
|
/* Use $2b$ as prefix for compatibility with OpenBSD's bcrypt. */
|
||||||
* Using the Prefix $2a$ to enable an anti-collision safety measure in musl libc.
|
#define BCRYPTMAGNUM(array) (array)[0]=(array)[3]='$',(array)[1]='2',(array)[2]='b',(array)[4]='\0'
|
||||||
* Negatively affects a subset of passwords containing the '\xff' character,
|
|
||||||
* which is not valid UTF-8 (so "unlikely to cause much annoyance").
|
|
||||||
*/
|
|
||||||
#define BCRYPTMAGNUM(array) (array)[0]=(array)[3]='$',(array)[1]='2',(array)[2]='a',(array)[4]='\0'
|
|
||||||
#endif /* USE_BCRYPT */
|
#endif /* USE_BCRYPT */
|
||||||
|
|
||||||
#if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT)
|
#if defined(USE_SHA_CRYPT) || defined(USE_BCRYPT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user