-
Notifications
You must be signed in to change notification settings - Fork 268
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
SecretKey::secret_bytes()
and Index<FullRante> for SecretKey
contradict each other
#724
Comments
Agreed, let's drop the indexing trait. I'm not certain what it's useful for. As for But yes, we should alias it to all the obvious things to guess. I would also be ok with just using |
Me neither, but I can tell you where it's used: in
It doesn't to me, at most it has connotations with writing to a writer. But maybe I'm biased having rewritten a bunch of APIs to return arrays instead of Conceptually I like
That's pretty much what I was thinking too, except I forgot about |
In any case, I think that the accessors for |
In the presence of other methods this is true. Though the only other thing we could "reasonably" return from that method is I'm thinking we should also remove all vec-returning methods that are not named |
Well, another point of confusion is that Agreed though that throughout the crate ecosystem we should use I don't think "we never do that in |
It shouldn't be a big deal in practice because it coerces to
I'd hope that the crate being no- |
So we have a method named
secret_bytes
instead of more intuitiveserialize
to alert the caller that the value is secret and needs to be handled with care but at the same time we have the[..]
operator to make sure extracting the bytes purposely or accidentally is as easy as possible.We should remove one of them and I vote for removing
Index
.BTW I'm quite annoyed about the unintuitive
secret_bytes
which I can never remember how it's called. I do understand why though and don't want to change it. I think the most we can do right now is put an alias on it. (It won't help me but maybe someone else at least.)The text was updated successfully, but these errors were encountered: