Skip to content

Conversation

@Protonull
Copy link
Contributor

This can be applied to other things too, of course, but didn't want to de-length-prefix everything at once.

This can be applied to other things too, of course, but didn't want to de-length-prefix everything at once.
@Gjum
Copy link
Member

Gjum commented Oct 3, 2023

How have you tested this?

@Protonull
Copy link
Contributor Author

How have you tested this?

What do you mean? It's in the specification.

image

@Huskydog9988
Copy link
Contributor

So basically it's just a header you're adding?

@Protonull
Copy link
Contributor Author

Quite the opposite, I'm removing header information because the length is already known, so there's no need to prefix the data with its length.

@Huskydog9988
Copy link
Contributor

Lgtm then. Also why does it only use sha1? Isn't it deprecated?

@Gjum
Copy link
Member

Gjum commented Oct 5, 2023

why does it only use sha1? Isn't it deprecated?

SHA1 is guaranteed to be implemented by every JVM, and we don't need any cryptographic capabilities from our hashing function as we only use it for content based indexing with a data size cap.
Some context: https://git-scm.com/docs/hash-function-transition/2.23.0

@Huskydog9988
Copy link
Contributor

I think this is ready to merge then

@Gjum Gjum merged commit febfff0 into CivPlatform:stable Oct 5, 2023
@Protonull Protonull deleted the dont-length-prefix-hashes branch October 5, 2023 17:42
@KalokaK KalokaK mentioned this pull request Aug 4, 2024
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

Successfully merging this pull request may close these issues.

3 participants