- Added a logo and many badges to README.
- Added directory
1_70
undertrybuild_tests
directory to ensure the tests pass and make sense for Minimum Supported Rust Version 1.70. - Wrote a build script
scripts/build-ver-tests.rs.rs
to copy the existing tests into the1_70
directory. - Made sure that this build script is only ran during testing phase by trigger it using
cargo eval scripts/build-ver-tests.rs
. - GitHub Actions updated to run
scripts/tests-all-features-1.70.sh
, which is a bash script that wrapsscripts/tests-all-features.sh
to do testing on Rust version 1.70.
- Minor fixes to
README.md
.
-
RTSecret<T, MEC>
is now available.RTSecret<T, MEC>
is the runtime version ofSecret<T, MEC, EC>
. -
Substitute of the
Secret<S>
insecrecy
crate is available asSecrecySecret<T>
albeit with a different function signature of the method.expose_secret(...)
. -
Following optimizations are done:
a. Given the type parameter
MEC
as an unsigned type-level integer, the second field ofRTSecret<T, MEC>
will be one of the following Rust's primitive unsigned integer types,u8
,u16
,u32
andu64
, depending on the projected runtime value ofMEC
.For example, if
MEC
istypenum::consts::U69
, then the second field ofRTSecret<T, MEC>
will be of typeu8
. This optimization is done because ifMEC
at runtime is projected to a value, e.g. 69, and the exposure counter, which is the second field of the type, will never exceed theMEC
's projected runtime value, then it only needs to be represented by an unsigned integer type (e.g.u8
) thatMEC
's projected runtime value (e.g. 69) is minimally representable by (since 69 <u8::MAX
= 255).b.
SecrecySecret<T>
is the same size asT
.