#traits #macro #subtle-ng

macro subtle-ng-derive

Derive macros for subtle-ng traits

6 releases

0.0.5 Jul 1, 2022
0.0.4 Jun 30, 2022

#1082 in Procedural macros

BSD-3-Clause

11KB
201 lines

subtle-ng-derive

A set of derive macros for subtle-ng traits:

  • #[derive(ConstantTimeEq)]: Implement equality by &=ing the .ct_eq() of every pair of fields.
  • #[derive(ConstantTimeGreater)]: Implement comparison in a more complex way by using .ct_eq() and .ct_gt() on each pair of fields.

License

BSD 3 Clause, to match the license of subtle-ng.


lib.rs:

Derive macros for subtle-ng traits.

Dependencies

~1.5MB
~32K SLoC