rand-repr 0.1.6

Randomize enum representations in accordance with Riscure Fault Mitigation Pattern 1
Documentation

rand-repr

Randomizes the representation of a macro as a countermeasure in embedded security

Ex:

#[randomize_repr(u32)]
enum Status {
    NoLogin,
    LoggedIn,
    SuperUser
}

becomes

#[repr(u32)]
enum USER_STATE {
    NoLogin = 92476339u32,
    LoggedIn = 2671715106u32,
    SuperUser = 714567915u32,
}