#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(missing_docs, rust_2018_idioms, unused_qualifications)]
#[derive(Copy, Clone, Debug)]
pub struct Error;
pub type Result<T> = core::result::Result<T, Error>;
#[cfg(feature = "prehash")]
#[cfg_attr(docsrs, doc(cfg(feature = "prehash")))]
pub fn sha256(message: &[u8]) -> [u8; 32] {
use sha2::digest::Digest;
let mut hash = sha2::Sha256::new();
hash.update(message);
let data = hash.finalize();
data.into()
}
#[cfg(cortex_m4)]
mod cortex_m4;
#[cfg(cortex_m4)]
pub use cortex_m4::*;
#[cfg(all(feature = "non-cortex-m4-fallback", not(cortex_m4)))]
mod fallback;
#[cfg(all(feature = "non-cortex-m4-fallback", not(cortex_m4)))]
pub use fallback::*;