You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most fields denoting sizes (e.g. of keys) are marked as usize at the moment. To make it less ambiguous, the ones representing sizes in bits should be set to u16, u32 or other types unrelated to word size on current platform (as the size itself is not related to the memory of the platform)
The text was updated successfully, but these errors were encountered:
While I'd love to have coding guidelines and be very explicit about how to handle various cases, at least from my experience it's difficult to actually keep them all in mind when coding (or when reviewing code). Maybe we should write some guidelines up nonetheless, so that we have something to fall back onto when debating how things should be implemented in a PR.
Is it still needed? We went back on this idea for PSA Crypto I believe
We went back on this idea for PSA Crypto because that spec explicitly uses usize for those sort of types, but I'm still not convinced it's as clear-cut
Most fields denoting sizes (e.g. of keys) are marked as
usize
at the moment. To make it less ambiguous, the ones representing sizes in bits should be set tou16
,u32
or other types unrelated to word size on current platform (as the size itself is not related to the memory of the platform)The text was updated successfully, but these errors were encountered: