Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: Rename step64 to step_base64? #31

Open
duesee opened this issue Nov 21, 2023 · 2 comments
Open

question: Rename step64 to step_base64? #31

duesee opened this issue Nov 21, 2023 · 2 comments

Comments

@duesee
Copy link
Contributor

duesee commented Nov 21, 2023

Hello!

I just started using your library and thought sharing my experience (as an rsasl newbie) could help improve it. I was confused about the name step64 because I expected it to have something to do with 32-bit vs 64-bit systems. Maybe it's just me.

But maybe step_base64 would be a better name?

PS: I really hope to get the rsasl integration done soon. As far as I see, this could work out really well 🙏🏻 So... thanks a lot for this crate!

@dequbed
Copy link
Owner

dequbed commented Nov 28, 2023

The main reason why it's called step64 is a hold-over from gsasl; this crate started as Rust bindings to it (which you can still find in the 1.X.X branch), and in that library the base64-wrapping function has the name gsasl_step64.

I'm not particularly beholden to the name, so I would merge a PR adding an alias function with a more appropriate name, your step_base64 sounds quite decent in that regard.

One question though; I did try to document the step64 method to point out it's exact purpose as succinctly as feasible, so I'm surprised anyone would mistake it for a 32-bit/64-bit issue. Can the documentation be improved so that others don't make the same mistake?

@duesee
Copy link
Contributor Author

duesee commented Nov 28, 2023

I read ...

On the resulting session the methods Session::step or Session::step64 are called until State::Finished is returned:

... first, and assumed there might be something I don't know about SASL yet. SASL extensions I don't know yet, etc. But it's really maybe just me: In IMAP you sometimes have 64 suffixes that distinguish between a 32 and 64 bit number. I was thinking in the same direction and wondered if this is communicated.

It could be something like ...

On the resulting session the methods Session::step (or Session::step64 for already base64-encoded data) are called until State::Finished is returned:

... maybe. But it's pretty clear when clicking on step64. So, this is only a minor improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants