pub fn validate_exponent(exponent: &BigInt) -> Result<(), MathError>Expand description
Validate that a BigInt is a valid exponent for modular exponentiation.
§Arguments
exponent- The exponent to validate
§Returns
Returns Ok(()) if the exponent is valid, or an error otherwise.
§Errors
Returns MathError::InvalidExponent if the exponent is negative.