PythonSqliteAndPasswordHash: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

    10 November 2023

    • curprev 16:4616:46, 10 November 2023RobertBushman talk contribs 502 bytes +502 Created page with "Category:Python <syntaxhighlight lang="python" line> from passlib.hash import bcrypt import sqlite3 def register(email: str, password: str): conn = sqlite.connect('test01.db') cursor = conn.cursor() cursor.execute(''' CREATE TABLE IF NOT EXISTS login ( id INTEGER PRIMARY KEY, email TEXT, hash TEXT ) ''') cursor.execute(''' INSERT INTO login (email, hash) VALUES (?, ?) ''', (username, bcrypt.hash(password)))..."