#[non_exhaustive]pub enum Error {
Pattern(PatternProblem),
Init(InitStage),
Prereq(Prerequisite),
State(StateProblem),
Input,
Dh,
Decrypt,
Rng,
}
Expand description
snow
provides decently detailed errors, exposed as the Error
enum,
to allow developers to react to errors in a more actionable way.
With that said, security vulnerabilities can be introduced by passing
along detailed failure information to an attacker. While an effort was
made to not make any particularly foolish choices in this regard, we strongly
recommend you don’t dump the Debug
output to a user, for example.
This enum is intentionally non-exhasutive to allow new error types to be introduced without causing a breaking API change.
snow
may eventually add a feature flag and enum variant to only return
an “unspecified” error for those who would prefer safety over observability.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pattern(PatternProblem)
The noise pattern failed to parse.
Init(InitStage)
Initialization failure, at a provided stage.
Prereq(Prerequisite)
Missing prerequisite material.
State(StateProblem)
An error in snow
’s internal state.
Input
Invalid input.
Dh
Diffie-Hellman agreement failed.
Decrypt
Decryption failed.
Rng
RNG failed.