microsoft / microsoft/rust-symcrypt
Explore ctor crate or equivalent that calls before any other function is called
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 15
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 11
Description
We need to call symcrypt_init() each time we enter the API, since we do not know where the API will enter we must call it at every public entry point possible.
This can be avoided by using a crate like ctor that will call before any other function is called, doing this adds the complexity and maintenance of another crate.
Another approach is to refactor the code so that you must init a symcrypt object before calling other method, and all methods would extend from the symcrypt object. This would require refactoring of all of the code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the public API entry points and locating the current symcrypt_init() calls. Compare the ctor-crate approach with requiring initialization through a SymCrypt object, then document the selected direction and its scope. Done means the initialization strategy is agreed and consistently applied across the API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100