User Tools

Site Tools


reference:password_strength_checking_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
reference:password_strength_checking_script [2026/01/05 09:23] paulreference:password_strength_checking_script [2026/01/05 09:25] (current) paul
Line 29: Line 29:
  
 function Check(Username, Password, minlength) function Check(Username, Password, minlength)
- lowerPassword = string.lower(Password)+ local lowerPassword = string.lower(Password)
  if Password == string.lower(Username) then  if Password == string.lower(Username) then
      return false      return false
Line 40: Line 40:
   end   end
  
- hasDigit = 0 + local hasDigit = 0 
- hasCaps = 0 + local hasCaps = 0 
- hasLower = 0 + local hasLower = 0 
- hasSpecial = 0+ local hasSpecial = 0
  if string.find(Password, "%d") then  if string.find(Password, "%d") then
     hasDigit = 1     hasDigit = 1
Line 56: Line 56:
      hasSpecial = 1      hasSpecial = 1
  end  end
- differentTypes = hasDigit + hasCaps + hasLower + hasSpecial+ local differentTypes = hasDigit + hasCaps + hasLower + hasSpecial
    
  if differentTypes >= minTypes then  if differentTypes >= minTypes then
reference/password_strength_checking_script.txt · Last modified: 2026/01/05 09:25 by paul