-
Notifications
You must be signed in to change notification settings - Fork 145
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
expose sorted object #51
Comments
@bean5 Can you explain a bit more how the API for this would look like, as you have it in mind? It sounds like you have a more concrete idea of it than I do… |
Just before hashing, but after sorting, return the sorted value. Do this as a subroutine by the hash functions. Exposing this as a function would allow this project to be used to sort deterministically. Does that make sense? |
@bean5 Sorry, but what do you mean by “return the sorted value before hashing”? That doesn’t quite make sense – after returning, a function doesn’t do anything anymore (by definition…) Are you talking about a hook that transforms values in a certain way? Or splitting this library into serialization + hashing? |
It would be a new function--likely one that all the hash functions would
call anyways. Optionally, you could return a struct instead of just a hash,
but that seems less clean and maintainable.
…On Mon, Oct 9, 2017 at 6:42 AM Anna Henningsen ***@***.***> wrote:
@bean5 <https://github.com/bean5> Sorry, but what do you mean by “return
the sorted value before hashing”? That doesn’t quite make sense – after
returning, a function doesn’t do anything anymore (by definition…)
Are you talking about a hook that transforms values in a certain way? Or
splitting this library into serialization + hashing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB9SJsb4t1fCkZgi_oIPkGkvfIZ3k5zQks5sqiLLgaJpZM4Pvw0e>
.
|
So, you want a way to get the intermediate object that’s created after sorting? |
Exactly.
…On Tue, Oct 10, 2017, 8:22 PM Anna Henningsen ***@***.***> wrote:
So, you want a way to get the intermediate object that’s created after
sorting?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB9SJnoHnJdy_NxCSSBYyOhy5xl1clZQks5srDRbgaJpZM4Pvw0e>
.
|
For auditing purposes, it would be helpful to have both the hash and the sorted object (e.g. the objects that would be hashed with setting of
{unorderedArrays: true, unorderedSets: true}
).I would contribute this option myself, but I don't think I would get it right.
The text was updated successfully, but these errors were encountered: