mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
modulate the sha512 target based on the host configuration
xous targets use the Precursor hardware engine for hashing all others use a software-only implementation. Not the most performant but the code is vendored in directly from the rustcrypto crate.
This commit is contained in:
parent
2addc83f76
commit
4d850bffbc
2 changed files with 7 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
pub(crate) const SERVER_NAME_SHA512: &str = "_Sha512 hardware accelerator server_";
|
||||
#[allow(dead_code)]
|
||||
pub(crate) const SERVER_NAME_SHA512: &str = "_Sha512 hardware accelerator server_"; // not used in hosted config
|
||||
mod rkyv_enum;
|
||||
pub use rkyv_enum::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,12 @@ pub use api::*;
|
|||
mod consts;
|
||||
|
||||
mod sha256;
|
||||
#[cfg(target_os = "xous")]
|
||||
mod sha512;
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
mod sha512_hosted;
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
use sha512_hosted as sha512;
|
||||
|
||||
pub use digest::{self, Digest};
|
||||
pub use sha256::{Sha224, Sha256};
|
||||
|
|
|
|||
Loading…
Reference in a new issue