Refactor Node.js API to use Uint8Array for data handling - #45
Merged
Conversation
- Updated method signatures in the `Keys` and `Transport` classes to replace `Buffer` with `Uint8Array`, enhancing consistency in data types across the API. - Modified encryption and decryption methods to utilize `Uint8Array`, improving performance and compatibility with modern JavaScript practices. - Adjusted TypeScript definitions to reflect the changes in method signatures, ensuring alignment with the updated Rust implementation. - Enhanced overall code clarity and maintainability by streamlining data handling processes in the API.
- Updated comprehensive API, lifecycle, cross-platform, and basic tests to replace Buffer checks with Uint8Array validations, enhancing consistency in data type handling. - Introduced a new utility function, `uint8ArrayEquals`, for comparing Uint8Array instances, improving code clarity and maintainability. - Adjusted assertions across multiple test files to ensure proper validation of cryptographic keys and encrypted data, aligning with recent API changes. - Enhanced overall test coverage and robustness by ensuring all relevant tests reflect the updated data handling practices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
KeysandTransportclasses to replaceBufferwithUint8Array, enhancing consistency in data types across the API.Uint8Array, improving performance and compatibility with modern JavaScript practices.