use crate::header::KeyId;
pub type Result<T> = std::result::Result<T, SframeError>;
#[derive(PartialEq, Eq, Debug, thiserror::Error)]
pub enum SframeError {
#[error("No EncryptionKey has been set")]
MissingEncryptionKey,
#[error("No DecryptionKey has been found")]
MissingDecryptionKey(KeyId),
#[error("Failed to Decrypt")]
DecryptionFailure,
#[error("Failed to Encrypt")]
EncryptionFailure,
#[error("Unable to create unbound encryption key")]
KeyExpansion,
#[error("{0}")]
FrameValidationFailed(String),
#[error("{0}")]
Other(String),
}