Closed yoavamit closed 2 years ago
@tholenst wdyt?
@tholenst wdyt?
The class can be public, but a private constructor should be added so that users can only register, but not create the object.
@tholenst wdyt?
The class can be public, but a private constructor should be added so that users can only register, but not create the object.
I'll add a commit making the constructor package private (same as HybridDecryptWrapper
)
@tholenst @thaidn I updated the PR to fix the constructor. Let me know if you think the changes look reasonable to you, or if there's anything else you think should be changed here 🙇
This looks good to me. Will merge.
Looking at the implementation in other languages (go, python, c++) this class/object is exposed.
Without the
HybridEncryptWrapper
class beingpublic
, users who decide to implement a customHybridEncrypt
andHybridDecrypt
primitives will have to manually register their primitives instead of using the more convenientHybridEncryptWrapper.register()
andHybridDecryptWrapper.register()
calls respectively.Clarification:
HybridDecryptWrapper
is already a public class, it's justHybridEncryptWrapper
class that needs to be exposed as well.