Closed est31 closed 2 years ago
For backwards compat, you could still keep the old function around but add a second one directly inside the root module.
Hm, I guess it's indeed worth to add a standalone function get_password_verifier<D: Digest>(private_key: &[u8], group: &'a SrpGroup) -> Vec<u8>
. I can add it in the next version.
On a side note: I think srp
needs a certain redesign, e.g. we could pull entropy automatically, so if you have any suggestions I will be happy to hear them out!
I guess it's indeed worth to add a standalone function
Thanks! I do think that a function right on the client struct is a good choice, as it is most convenient, but there should also be a "pure" one.
we could pull entropy automatically
Yeah, that would be a good idea. However, there should still be the option to provide the numbers yourself so that e.g. your unit tests could be deterministic.
As for further ideas for the redesign, one thing that I found a bit weird was the UserRecord
struct. All the function needs from the struct is the verifier, and the other members of the struct aren't used anywhere in the API. Otherwise I'm okay with the API.
Fixed in #79
It would be awesome if the function
get_password_verifier
wouldn't require a client but just had a signature likefn get_password_verifier<D: Digest>(private_key: &[u8], params, &[u8]) -> Vec<u8>
or something.