Files
openGauss-OM/script/base_utils/os/password_util.py
2024-06-27 09:09:22 +08:00

14 lines
384 B
Python

import re
from gspylib.common.ErrorCode import ErrorCode
class PasswordUtil:
@staticmethod
def checkPasswordVaild(password):
"""
function: check password vaild
input : password
output: NA
"""
# check if the password contains illegal characters
return re.search(r'^[A-Za-z0-9~!@#%^*_=+?,.:/$-]+$', password)