refactor(router): make routes public and move crypto module to common utils (#176)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
ItsMeShashank
2022-12-19 19:34:24 +05:30
committed by GitHub
parent 9a4b1d023e
commit bf322c9535
8 changed files with 55 additions and 26 deletions

View File

@ -54,3 +54,20 @@ pub enum ValidationError {
#[error("{message}")]
InvalidValue { message: String },
}
/// Cryptograpic algorithm errors
#[derive(Debug, thiserror::Error)]
pub enum CryptoError {
/// The cryptographic algorithm was unable to encode the message
#[error("Failed to encode given message")]
EncodingFailed,
/// The cryptographic algorithm was unable to decode the message
#[error("Failed to decode given message")]
DecodingFailed,
/// The cryptographic algorithm was unable to sign the message
#[error("Failed to sign message")]
MessageSigningFailed,
/// The cryptographic algorithm was unable to verify the given signature
#[error("Failed to verify signature")]
SignatureVerificationFailed,
}