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

Add optional parameter includeLength to encrypt/decrypt functions, to add possibility encrypt/decrypt values without length #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EgzoT
Copy link

@EgzoT EgzoT commented Jan 30, 2022

No description provided.

@andot
Copy link
Member

andot commented Feb 2, 2022

Without length, the decrypt text is not correct if the encrypt data length is not a multiple of 4.

@EgzoT
Copy link
Author

EgzoT commented Feb 3, 2022

Without length, the decrypt text is not correct if the encrypt data length is not a multiple of 4.

Yes, I only tested for multiples of 4. But I didn't use this for text but for Buffer data converted to Uint8Array (data from bluetooth device). So, what's the best way to convert Buffer data using these methods?

@andot
Copy link
Member

andot commented Feb 15, 2022

You don't need to modify anything. Just call encrypt and decrypt directly with Uint8Array arguments.

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.

None yet

2 participants