d3xs-protocol 0.1.0

Physical access control (protocol)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror_no_std::Error;

#[derive(Error, Debug)]
pub enum Error {
    #[error("crypto failed")]
    Crypto(#[from] crypto_box::aead::Error),
    #[error("failed to decode buffer")]
    DecodeEncoding(#[from] data_encoding::DecodeError),
    #[error("invalid length for key: {0}")]
    InvalidKeyLength(usize),
    #[error("invalid challenge response")]
    InvalidChallengeReponse,
    #[error("authentication failed")]
    AuthError,
    #[error("buffer size exceeded")]
    BufferLimit,
}
pub type Result<T> = core::result::Result<T, Error>;