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

refactor(bloc): calculate composite object hashes through Object.hashAll #3090

Closed
purplenoodlesoop opened this issue Dec 23, 2021 · 3 comments · Fixed by #4310
Closed

refactor(bloc): calculate composite object hashes through Object.hashAll #3090

purplenoodlesoop opened this issue Dec 23, 2021 · 3 comments · Fixed by #4310
Assignees
Labels
dependency This issue has an external dependency refactor Refactor an existing implementation
Milestone

Comments

@purplenoodlesoop
Copy link
Contributor

Hi!

In Dart version 2.14 class Object obtained a new static method – hashAll.

It is a recommended method of computing a hash of multiple objects since the bitwise XOR (^) is symmetric and is not secure.

There are two places where bitwise XOR is used to combine hashes: here and here.

The package's current minimal version is 2.12, but I think that it's worth keeping in mind for the future.

@purplenoodlesoop purplenoodlesoop added the refactor Refactor an existing implementation label Dec 23, 2021
@felangel
Copy link
Owner

Hey @purplenoodlesoop 👋
Thanks for opening an issue!

I’m aware of this but didn’t think it’s worth bumping the sdk constraint to 2.14 just for this change since this implementation has been untouched for a while now.

If we have a better reason to upgrade to Dart 2.14 then we can make this change as well but for now I’d prefer to leave it as is unless you’re running into specific issues.

Let me know what you think and thanks again!

@felangel felangel self-assigned this Dec 24, 2021
@felangel felangel added question Further information is requested waiting for response Waiting for follow up labels Dec 24, 2021
@purplenoodlesoop
Copy link
Contributor Author

I’m aware of this but didn’t think it’s worth bumping the sdk constraint to 2.14 just for this change since this implementation has been untouched for a while now. If we have a better reason to upgrade to Dart 2.14 then we can make this change...

Oh, I totally agree with the fact that it is not worth bumping the minimal version only because of this static method, as I stated in the original issue, "I think that it's worth keeping in mind for the future." :)

@felangel felangel added dependency This issue has an external dependency and removed question Further information is requested waiting for response Waiting for follow up labels Dec 24, 2021
@PawlikMichal25
Copy link

I realise it's not a high priority issue, but I noticed that a couple of other 'fundamental' packages are already >= 2.14, for example:

so probably it wouldn't break too many apps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency This issue has an external dependency refactor Refactor an existing implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants