Uživatelské nástroje

Nástroje pro tento web


passwordstrength

Rozdíly

Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.

Odkaz na výstup diff

passwordstrength [2017/10/10 00:00] (aktuální)
Řádek 1: Řádek 1:
 +====== Password Strength ======
 +Česky: [[BezpecnostHesla]]
 +
 +===== About =====
 +
 +This feature shows, how strong the password is:
 +  * +1 point for each character over 6 in length
 +  * +1 point for being mixed case, upper and lower
 +  * +1 point for including both numbers and letters
 +  * +1 point for including punctuation
 +
 +  * less than 3 points -> weak password
 +  * 3 - 5 points -> good password
 +  * 5 and more points -> strong password
 +
 +===== Example =====
 +
 +<​html>​
 +<script type="​text/​javascript"​ src="​http://​lib.adamh.cz/​password-strength/​password.js"></​script>​
 + <​table>​
 + <​tr>​
 + <​td><​strong>​Type ypur password:</​strong></​td>​
 + <​td><​input type="​password"​ name="​password"​ id="​password"​ onkeyup="​checkPassword(this.value,​ '​strength',​ new Array('​too short',​ '​weak',​ '​good',​ '​strong'​))"​ /></​td>​
 + </​tr>​
 + <​tr>​
 + <​td>​Password strength:</​td>​
 + <​td><​b id="​strength">​not inserted</​b></​td>​
 + </​tr>​
 + </​table>​
 +</​html>​
 +
 +===== Example Code =====
 +
 +<code html>
 +<​strong>​Type ypur password:</​strong>​
 +<input type="​password"​ name="​password"​ id="​password"​ onkeyup="​checkPassword(this.value,​ '​strength',​ new Array('​too short',​ '​weak',​ '​good',​ '​strong'​))"​ />
 +<br />
 +<b id="​strength">​not inserted</​b>​
 +</​code>​
 +
 +Don't forget to include JavaScript library into your page (//head// section):
 +<code html>
 +<script type="​text/​javascript"​ src="​password.js"></​script>​
 +</​code>​
 +
 +===== Description =====
 +
 +//Integer// **passwordStrength**(//​String//​ **password**)
 +
 +Returns password'​s strength points
 +  * **password** - password to be checked
 +
 +-----------------------------------
 +
 +//void// **checkPassword**(//​String//​ **password**,​ //String// **id**, //Array// **messages**)
 +
 +Displays message
 +  * **password** - password to be checked
 +  * **id** - id of element for displaying the message
 +  * **messages** - array of messages with 4 elements - for example 'too short',​ '​weak',​ '​good',​ '​strong'​
 +
 +===== License =====
 +(c) 2008 [[http://​adamh.cz|Adam Heinrich]]
 +
 +Licensed under [[http://​www.gnu.org/​licenses/​gpl.txt|GNU General Public License]]
 +
 +===== Download =====
 +
 +Library and example page at http://​lib.adamh.cz/​password-strength
  
passwordstrength.txt · Poslední úprava: 2017/10/10 00:00 (upraveno mimo DokuWiki)


© 2008-2012 Adam Heinrich, adamh.cz, adam@adamh.cz