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

Fix associated data serialization to always include length #486

Open
2 tasks
marsella opened this issue Feb 10, 2023 · 0 comments
Open
2 tasks

Fix associated data serialization to always include length #486

marsella opened this issue Feb 10, 2023 · 0 comments

Comments

@marsella
Copy link
Contributor

The conversion functions between AssociatedData and Vec<u8> only encode the data itself, but it's more misuse-resistant to encode the length prepended to the data. The encoding of the length can be a fixed size (see #470 for an upper bound).

  • Update the TryFrom and From methods to convert between the two types
  • At calling spots, remove any redundant length prepending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants