@@ -113,6 +113,10 @@ impl PqcConfig {
}
/// Validate the configuration
+ ///
+ /// # Errors
+ ///
+ /// Returns an error if configuration is invalid
pub fn validate(&self) -> Result<(), ConfigError> {
// PqcOnly mode requires at least one PQC algorithm
if self.mode == PqcMode::PqcOnly && !self.ml_kem_enabled && !self.ml_dsa_enabled {
@@ -205,6 +209,10 @@ impl PqcConfigBuilder {
}
/// Build the `PqcConfig`, validating all settings
+ ///
+ /// # Errors
+ ///
+ /// Returns an error if configuration is invalid
pub fn build(self) -> Result<PqcConfig, ConfigError> {
let config = PqcConfig {
mode: self.mode,