Sistema de login com interface gráfica moderna, banco de dados SQLite e armazenamento seguro de senhas com hash SHA-256.
Aplicação desktop com interface gráfica construída em Python usando CustomTkinter. Permite criar usuários e realizar login com autenticação real via banco de dados. As senhas nunca são armazenadas em texto puro — são convertidas em hash SHA-256 antes de serem salvas.
- 🖥️ Interface gráfica moderna com tema escuro (dark mode)
- 👤 Cadastro de novos usuários em uma janela separada
- 🔒 Login com autenticação via banco de dados SQLite
- 🔑 Senhas armazenadas com hash SHA-256 (nunca em texto puro)
- 👁️ Toggle para mostrar/ocultar senha
⚠️ Feedback visual de sucesso e erro diretamente na tela
| Tecnologia | Uso |
|---|---|
| Python 3 | Linguagem principal |
| CustomTkinter | Interface gráfica moderna |
| SQLite3 | Banco de dados local |
| Hashlib (SHA-256) | Hash seguro de senhas |
├── main.py # Interface gráfica e lógica da aplicação
├── database.py # Conexão com banco, criação de tabela e funções CRUD
├── banco.db # Banco de dados SQLite (gerado automaticamente)
└── README.md
1. Clone o repositório:
git clone https://github.com/semendeZ0/Login_CTk.git
cd Login_CTk2. Crie e ative o ambiente virtual:
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
source .venv/bin/activate3. Instale a dependência:
pip install customtkinter4. Execute:
python main.pyO arquivo
banco.dbé criado automaticamente na primeira execução.
As senhas são processadas com hashlib.sha256() antes de qualquer operação com o banco de dados. Isso significa que nem quem tiver acesso direto ao arquivo .db consegue ver as senhas reais.
senha_hash = hashlib.sha256(senha.encode()).hexdigest()Interface principal com tema dark-blue do CustomTkinter.
Feito por Erick — @semendeZ0
A login system with a modern graphical interface, SQLite database, and secure password storage using SHA-256 hashing.
A desktop application with a graphical interface built in Python using CustomTkinter. It allows users to register and log in with real database authentication. Passwords are never stored in plain text — they are converted to a SHA-256 hash before being saved.
- 🖥️ Modern graphical interface with dark mode theme
- 👤 New user registration in a separate window
- 🔒 Login with SQLite database authentication
- 🔑 Passwords stored as SHA-256 hashes (never in plain text)
- 👁️ Toggle to show/hide password
⚠️ Visual success and error feedback directly on screen
| Technology | Purpose |
|---|---|
| Python 3 | Main language |
| CustomTkinter | Modern graphical interface |
| SQLite3 | Local database |
| Hashlib (SHA-256) | Secure password hashing |
├── main.py # Graphical interface and application logic
├── database.py # Database connection, table creation and CRUD functions
├── banco.db # SQLite database (auto-generated)
└── README.md
1. Clone the repository:
git clone https://github.com/semendeZ0/Login_CTk.git
cd Login_CTk2. Create and activate the virtual environment:
python -m venv .venv
# Windows
.venv\Scripts\activate
# Linux/macOS
source .venv/bin/activate3. Install the dependency:
pip install customtkinter4. Run:
python main.pyThe
banco.dbfile is created automatically on the first run.
Passwords are processed with hashlib.sha256() before any database operation. This means that even someone with direct access to the .db file cannot see the actual passwords.
senha_hash = hashlib.sha256(senha.encode()).hexdigest()Main interface with CustomTkinter's dark-blue theme.
Made by Erick — @semendeZ0