projects/plugins/jetpack/_inc/lib/class.jetpack-password-checker.php 1 location
|
@@ 505-512 (lines=8) @@
|
| 502 |
|
* @param String $char character. |
| 503 |
|
* @return Integer the character code. |
| 504 |
|
*/ |
| 505 |
|
protected function get_char_index( $char ) { |
| 506 |
|
$char = strtolower( $char[0] ); |
| 507 |
|
if ( $char < 'a' || $char > 'z' ) { |
| 508 |
|
return 0; |
| 509 |
|
} else { |
| 510 |
|
return ord( $char[0] ) - ord( 'a' ) + 1; |
| 511 |
|
} |
| 512 |
|
} |
| 513 |
|
|
| 514 |
|
/** |
| 515 |
|
* This is the password strength calculation algorithm, based on the formula H = L(logN/log2). |
projects/packages/password-checker/src/class-password-checker.php 1 location
|
@@ 524-531 (lines=8) @@
|
| 521 |
|
* |
| 522 |
|
* @return int the character code. |
| 523 |
|
*/ |
| 524 |
|
protected function get_char_index( $char ) { |
| 525 |
|
$char = strtolower( $char[0] ); |
| 526 |
|
if ( $char < 'a' || $char > 'z' ) { |
| 527 |
|
return 0; |
| 528 |
|
} else { |
| 529 |
|
return ord( $char[0] ) - ord( 'a' ) + 1; |
| 530 |
|
} |
| 531 |
|
} |
| 532 |
|
|
| 533 |
|
/** |
| 534 |
|
* This is the password strength calculation algorithm, based on the formula H = L(logN/log2). |