embedded-cal 0.2.0

A Cryptographic Abstraction Layer (CAL) for embedded systems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: MIT OR Apache-2.0
// SPDX-FileCopyrightText: Inria-AIO, Cryspen, and Christian Amsüss
//! Common error types.
//!
//! Errors here are exclusively zero-sized, as they are not generally actionable.

/// Error indicating that a imported key's size does not match the given algorithm, or that the data
/// was otherwise found flawed.
#[derive(Debug)]
pub struct ImportError;

impl core::fmt::Display for ImportError {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        f.write_str("data not valid for algorithm")
    }
}

impl core::error::Error for ImportError {}