-
Notifications
You must be signed in to change notification settings - Fork 3
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
encrypt_properties #44
base: master
Are you sure you want to change the base?
Conversation
add a description |
@akash-gautam07 this needs tests ;-) |
@silesky updated the tests :) |
00d667d
to
a9e3dfa
Compare
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.
Looks good, just some small changes =S
was the interface the only comment? i'd like an approval if there are no more comments because of timezone difference, but there is an issue in code, with seed being passed i am not getting a stable cipher text. |
package.json
Outdated
"tiny-hashes": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^27.4.0", | ||
"@types/node": "^16.18.40", |
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.
Do we actually need node types here? It's better to not have any node types in an isomorphic package, since it ensures we don't accidentally use node built-ins in our code (I sometimes add them for tests, but not ideal).
9558e85
to
75d228c
Compare
@akash-gautam07 there's an assertion that's failed . we are not getting stable identifiers can you fix this |
const labelBytes = forge.util.encodeUtf8(label) | ||
let ciphertextBase64: string | ||
|
||
if (seed) { |
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.
Should this be !seed?
@saiprasannasastry Isn't it the purpose of utilizing RSA-OAEP is to ensure the generation of new ciphertexts each time? The tsub code also generates different encrypted ciphers each time. |
This PR creates a encrypt_properties case in the tsub-js, to provide functionality for encrypting the properties.