Handler registration best practice

17 views
Skip to first unread message

Gergely Polonkai

unread,
Mar 24, 2021, 12:58:46 PM3/24/21
to passlib-users
i’m writing a module to be able to handle Werkzeug’s password hash formats, like the most common

pbkdf2:sha256:150000$salt$checksum

The functions are ready, and if i call

register_crypt_handler_path('werkzeug_pbkdf2_sh256', 'passlib_werkzeug')

it works just fine.

Question is, if i want to publish this module so anyone can use it, should i tell them to call register_crypt_handler_path, provide them with a function with a shorter name (like, register) that does it for them but they still have to call it manually, or just put this one line at the end of my module’s code, on the top level?

On a related side note, if anyone could help me with a review (ie. did i do everything right?), it’s available at https://gitea.polonkai.eu/gergely/passlib-werkzeug.


Reply all
Reply to author
Forward
0 new messages