pub enum PqcError {
Show 21 variants
InvalidKeySize {
expected: usize,
actual: usize,
},
InvalidCiphertextSize {
expected: usize,
actual: usize,
},
InvalidCiphertext,
InvalidSignatureSize {
expected: usize,
actual: usize,
},
KeyGenerationFailed(String),
EncapsulationFailed(String),
DecapsulationFailed(String),
SigningFailed(String),
VerificationFailed(String),
FeatureNotAvailable,
CryptoError(String),
PoolError(String),
InvalidPublicKey,
InvalidSignature,
InvalidSecretKey,
EncryptionFailed(String),
DecryptionFailed(String),
InvalidSharedSecret,
OperationNotSupported,
NegotiationFailed(String),
KeyExchangeFailed,
}Expand description
Errors that can occur during PQC operations
Variants§
InvalidKeySize
Invalid key size
InvalidCiphertextSize
Invalid ciphertext size
InvalidCiphertext
Invalid ciphertext
InvalidSignatureSize
Invalid signature size
KeyGenerationFailed(String)
Key generation failed
EncapsulationFailed(String)
Encapsulation failed
DecapsulationFailed(String)
Decapsulation failed
SigningFailed(String)
Signing failed
VerificationFailed(String)
Verification failed
FeatureNotAvailable
Feature not available
CryptoError(String)
Generic cryptographic error
PoolError(String)
Memory pool error
InvalidPublicKey
Invalid public key
InvalidSignature
Invalid signature
InvalidSecretKey
Invalid secret key
EncryptionFailed(String)
Encryption failed
DecryptionFailed(String)
Decryption failed
Invalid shared secret
OperationNotSupported
Operation not supported
NegotiationFailed(String)
Negotiation failed
KeyExchangeFailed
Key exchange failed
Trait Implementations§
Source§impl Error for PqcError
impl Error for PqcError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PqcError
impl RefUnwindSafe for PqcError
impl Send for PqcError
impl Sync for PqcError
impl Unpin for PqcError
impl UnsafeUnpin for PqcError
impl UnwindSafe for PqcError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.