Stateful initialization of crypto backends#248
Conversation
chrysn
left a comment
There was a problem hiding this comment.
That sounds like a lot of unsafe and not-thread-safe comments with little guidance on how to use right. Wouldn't this be way easier to do in a constructor to Crypto, which has a static_cell as part of the initializer?
In the
I thought of that, the issue is how to provide a constructor that is generic for all backends (what should it take as parameter?). |
Yeah, but that should be limited to the C or register calls; having a static mut is unsafe independently of that (and, moreover, about to be deprecated in favor of
There's two ways to answer that:
|
Fixes #94.