pub enum PromocryptError {
Show 19 variants
FileNotFound(String),
InvalidFileFormat,
InvalidFileFormatDetails(String),
UnsupportedVersion(u8),
HeaderChecksumMismatch,
DecryptionFailed,
EncryptionFailed(String),
MachineIdUnavailable(String),
MachineMismatch,
SecretRequired,
InvalidLength {
expected: usize,
actual: usize,
},
InvalidCharacter(char),
InvalidCheckDigit,
CounterLocked,
CounterOverflow,
Io(Error),
InvalidAlphabet(String),
InvalidArgument(String),
Json(Error),
}Expand description
Main error type for all promocrypt operations.
Variants§
FileNotFound(String)
Binary file was not found at the specified path.
InvalidFileFormat
Binary file format is invalid or unrecognized.
InvalidFileFormatDetails(String)
Binary file format is invalid with specific details.
UnsupportedVersion(u8)
Binary file version is not supported.
HeaderChecksumMismatch
Header checksum verification failed.
DecryptionFailed
Decryption failed due to invalid key or corrupted data.
EncryptionFailed(String)
Encryption operation failed.
Machine ID could not be determined.
MachineMismatch
File is bound to a different machine.
SecretRequired
Operation requires a secret key but none was provided.
InvalidLength
Code has incorrect length.
InvalidCharacter(char)
Code contains a character not in the alphabet.
InvalidCheckDigit
Check digit verification failed.
CounterLocked
Counter file is locked by another process.
CounterOverflow
Counter has reached its maximum value.
Io(Error)
An I/O error occurred.
InvalidAlphabet(String)
The provided alphabet is invalid.
InvalidArgument(String)
An invalid argument was provided.
Json(Error)
JSON serialization or deserialization error.