nstilt1 / crypto-on-the-edge

A WIP Rust crate for generating private keys from IDs based on an HKDF, and eliminates the need to store private keys.
Apache License 2.0
0 stars 0 forks source link

reworking generic params #10

Closed nstilt1 closed 4 months ago

nstilt1 commented 4 months ago

This PR changes the generic params around so that the maximum amount of compile-time checks can be made, while offering some flexibility with TimestampPolicy. It also adds some const fns in the utils.rs instead of macros.

The only things that can't be checked at compile time are the ID Length and the TimestampPolicy, which still get validated at runtime but might result in an error when creating IDs

Fixes #9