-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Node encryption of ArrayBuffer plaintext
ArrayBuffer does not have a property named `length`, and also Buffer.concat does not accept an argument of type ArrayBuffer. The createTestMessage stuff introduced in the tests is a result of wanting to be able to perform multiple tests relating to the same original data without one test affecting another, given two things: 1. I want to be able to explicitly manipulate the message inside my test case (e.g. to change its `data` property to an ArrayBuffer). 2. Message.encode appears to have the side effect of manipulating the `data` property of the message that it is passed. This doesn’t feel intentional (and indeed is quite surprising), but I haven’t investigated it here. Resolves #1281.
- Loading branch information
1 parent
54a9fc5
commit 5592d04
Showing
2 changed files
with
60 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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