1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) 2022 MASSA LABS <info@massa.net>

//! massa-cipher error module

use displaydoc::Display;
use thiserror::Error;

/// Cipher error
#[derive(Display, Error, Debug)]
pub enum CipherError {
    /// Encryption error: {0}
    EncryptionError(String),
    /// Decryption error: {0}
    DecryptionError(String),
    /// `Utf8` error: {0}
    Utf8Error(#[from] std::str::Utf8Error),
}