cher-nov / cryptg

Official Telethon extension to provide much faster cryptography for Telegram API requests.
https://pypi.org/project/cryptg/
Creative Commons Zero v1.0 Universal
75 stars 24 forks source link

calculate_2fa #23

Open iamDonkey opened 2 years ago

iamDonkey commented 2 years ago

can you please add calculate_2fa function from grammers crypto?

https://github.com/Lonami/grammers/blob/master/lib/grammers-crypto/src/two_factor_auth.rs#L32

iamDonkey commented 1 year ago

@Rongronggg9 can you please add?

Lonami commented 1 year ago

You can send a pull request yourself @iamDonkey. It should be simple. Simply add a new fn in lib.rs exposing the calculate_2fa method, and then add

m.add_wrapped(wrap_pyfunction!(your_new_fn))?;

inside the #[pymodule] fn cryptg.