generated from 47ng/typescript-library-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Feat: Allow custom cipher and decipher functions #23
Open
Vitu-77
wants to merge
13
commits into
47ng:next
Choose a base branch
from
Vitu-77:feat/custom-cipher-function
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b8783ad
feat: Custom encrypt function feature
Vitu-77 1669393
feat: adding add to custom callback function
gustavopedroni 2eb7f4f
feat: creating test for custom decrypt function
Vitu-77 c899eed
fix: fixing fake decryption fn text
Vitu-77 a988d9c
fix: configureKeys params
Vitu-77 d4ff75a
feat: passing encryptFn and decryptFn as write and read params
Vitu-77 7edf3a3
feat: ensuring encryption and decryption functions are provided
Vitu-77 a260e5b
chore: Fix typos, exports & formatting
franky47 38f41d9
feat: discriminating union of configuration
Vitu-77 49b4002
fix: encrypt and recrypt types
Vitu-77 fcabf7d
doc: custom cipher suite docs
Vitu-77 d51e0f8
Merge branch 'feat/custom-cipher-function' of https://github.com/Vitu…
Vitu-77 9bdb150
setting npm publish config
Vitu-77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we would need a way to pass the encryption key, or are you assuming that providing a custom cipher opts the user out of key management?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this, since the idea is to provide the user total control about encrypt/decrypt methods, only the function are needed for this.
The key management would be part of the provided cipher logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Can you add some documentation about the feature in the README please? Emphasizing that key management is left to the user's appreciation would be good, since the options to pass keys in code are still available (or we could disallow them if a custom cipher is used, via a TS discriminating union, up to you).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I liked your suggestion, to remove the option to provide keys when custom functions are passed. I will implement this along with the documentation.