Module capsules_extra::sha

source ·
Expand description

SHA

§Usage

let sha = &earlgrey::sha::HMAC;

let mux_sha = static_init!(MuxSha<'static, lowrisc::sha::Sha>, MuxSha::new(sha));
digest::DigestMut::set_client(&earlgrey::sha::HMAC, mux_sha);

let virtual_sha_user = static_init!(
    VirtualMuxSha<'static, lowrisc::sha::Sha>,
    VirtualMuxSha::new(mux_sha)
);
let sha = static_init!(
    capsules::sha::ShaDriver<'static, VirtualMuxSha<'static, lowrisc::sha::Sha>>,
    capsules::sha::ShaDriver::new(
        virtual_sha_user,
        board_kernel.create_grant(&memory_allocation_cap),
    )
);
digest::DigestMut::set_client(virtual_sha_user, sha);

Structs§

Constants§