Authentication
Project description
Open Kage's useful Auth methods But, this is develope version. So, suddenly it will be big change when I got some more good idea.
Install
pip3 install kAuth
Custom Dictionary Class
Contents
-
Added New commands
- is_right_password() : Check requirements in the password string
- gen_random() : Generate random password
- enc_passwd() : Encript password
- dec_passwd() : decript password
- is_right_email() : check right email format
- is_right_domain() : check right domain (not yet)
- update_password_to_system() : update password to Linux system
- check_password_to_system() : check username and password from the linux system
- read_otp_key_from_user_account() :
- send_otp_to_email() : Send my opt number to email
- verify_otp() : Verify OTP number
-
requirements requirement package names are crypt, pyotp, pyqrcode, kmisc
-
Initialize Auth method
import kAuth
- is_right_password() : Check right password or not
- default check everything
- RL=True/False : Check Low characters
- RC=True/False : Check Capital characters
- RI=True/False : Check Integer (0-9)
- RS=True/False : Check Symbols
- LN=8 : Password length (default 8)
>>> password='Test Password'
>>> rt=is_right_password(password,RI=False,RS=False)
if rt[0]:
print('right format')
else:
print(rt[1])
- gen_random() : generate random string
- req=[,,] : requirements
- 'str' : Strings (Capital and Lower)
- 'lower' : lower strings
- 'captial' : Capital strings
- 'int' : integer (0-9)
- 'sym' : symbols
- length : make a string length (default 8)
>>> print(gen_random(req=['lower','int'],length=12))
'h06ypaeay1mn'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kAuth-1.0.8.tar.gz
(4.4 kB
view details)
Built Distribution
kAuth-1.0.8-py3-none-any.whl
(4.1 kB
view details)
File details
Details for the file kAuth-1.0.8.tar.gz
.
File metadata
- Download URL: kAuth-1.0.8.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 695a12304caa39223be004055b0045e0a1d15f343aa892398017608fb04c98a9 |
|
MD5 | 1af04ad8c9b7f3e1738c9b391672d782 |
|
BLAKE2b-256 | fbc77758ff98e739d591dc78e3e0781710bdc551e5d69209e98a07031c542495 |
File details
Details for the file kAuth-1.0.8-py3-none-any.whl
.
File metadata
- Download URL: kAuth-1.0.8-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae383506c07140a3b854ed22fba529d45b1efdcbf9d6fb57cc6cfadd52f87f5c |
|
MD5 | 15ead3113c1afcff9c27460e671681b3 |
|
BLAKE2b-256 | 904c9524c0ea5b2505491a84882f024813a88c5ac73a633e96d47bf137de1564 |