Fix ISealOptions TypeScript type to include skipEncryption#64
Open
rubenhensen wants to merge 1 commit intomainfrom
Open
Fix ISealOptions TypeScript type to include skipEncryption#64rubenhensen wants to merge 1 commit intomainfrom
rubenhensen wants to merge 1 commit intomainfrom
Conversation
Re-apply the changes from the unmerged `skip-encryption` branch (commit 0944abe) which were lost when commit b01170b was merged without including them. When `skipEncryption` is true, a default policy is used so that anyone can decrypt (sign-only mode). Changes: - Add `skipEncryption?: boolean` to the TS type definition - Make `policy` optional in both TS type and Rust struct - Add `skip_encryption: Option<bool>` to SealOptions - Implement default policy logic in js_seal and js_stream_seal - Update existing tests for new SealOptions fields - Add skip encryption streaming test Closes #63
83b74b9 to
f276b5a
Compare
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.
Summary
Re-applies the changes from the unmerged
skip-encryptionbranch (commit 0944abe by @Iso5786) which were lost when commit b01170b was merged without including them. The npm package@e4a/pg-wasm@0.3.7was published from a build that included these changes, butmainnever got them — causing a mismatch between the published types/binary and the source code.Changes:
skipEncryption?: booleanto the TypeScriptISealOptionsinterfacepolicyoptional in both TS type and Rust struct (Option<EncryptionPolicy>)skip_encryption: Option<bool>toSealOptionsRust structjs_sealandjs_stream_seal— whenskipEncryptionis true, uses a default policy so anyone can decrypt (sign-only mode)SealOptionsfieldstest_seal_unseal_web_to_rust_skip_encstreaming testThe
origin/skip-encryptionbranch can be deleted after this is merged.Closes #63
Test plan
sealStream()works withoutskipEncryption(defaults tofalse)sealStream()works withskipEncryption: true(uses default policy)wasm-pack test)