ppassword namespace
This commit is contained in:
parent
70a4cfdf51
commit
d4e89dd448
|
|
@ -269,7 +269,7 @@ static uint64_t uint_sqrt(uint64_t n) {
|
|||
return m;
|
||||
}
|
||||
|
||||
uint64_t psync_password_score(const char *cpassword) {
|
||||
uint64_t ppassword_score(const char *cpassword) {
|
||||
uint64_t score, oscore, num;
|
||||
char unsigned *lpwd, *ldpwd, *password;
|
||||
size_t plen, nlen;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,6 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
uint64_t psync_password_score(const char *password);
|
||||
uint64_t ppassword_score(const char *password);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2153,7 +2153,7 @@ int psync_upload_file_as(const char *remote_path, const char *remote_filename,
|
|||
}
|
||||
|
||||
int psync_password_quality(const char *password) {
|
||||
uint64_t score = psync_password_score(password);
|
||||
uint64_t score = ppassword_score(password);
|
||||
if (score < (uint64_t)1 << 30)
|
||||
return 0;
|
||||
if (score < (uint64_t)1 << 40)
|
||||
|
|
@ -2163,7 +2163,7 @@ int psync_password_quality(const char *password) {
|
|||
}
|
||||
|
||||
int psync_password_quality10000(const char *password) {
|
||||
uint64_t score = psync_password_score(password);
|
||||
uint64_t score = ppassword_score(password);
|
||||
if (score < (uint64_t)1 << 30)
|
||||
return score / (((uint64_t)1 << 30) / 10000 + 1);
|
||||
if (score < (uint64_t)1 << 40)
|
||||
|
|
|
|||
Loading…
Reference in New Issue