FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpython/Doc/includes/sqlite3/md5func.py at master · python-emscripten/cpython · GitHub
python-emscripten
cpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cpython
/
Doc
/
includes
/
sqlite3
/
md5func.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
13 lines (10 loc) · 254 Bytes
Breadcrumbs
cpython
/
Doc
/
includes
/
sqlite3
/
md5func.py
Copy path
File metadata and controls
13 lines (10 loc) · 254 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
import
sqlite3
import
hashlib
def
md5sum
(
t
):
return
hashlib
.
md5
(
t
).
hexdigest
()
con
=
sqlite3
.
connect
(
":memory:"
)
con
.
create_function
(
"md5"
,
1
,
md5sum
)
cur
=
con
.
cursor
()
cur
.
execute
(
"select md5(?)"
, (
b"foo"
,))
print
(
cur
.
fetchone
()[
0
])
con
.
close
()
Back
|
FazBrowse Home
|
New Git URL