belt-mac 0.2.0

MAC specified by the BelT standard
Documentation
#![no_std]
#![doc = include_str!("../README.md")]
#![doc(
    html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg",
    html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/26acc39f/logo.svg"
)]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub use digest::{self, KeyInit, Mac};

/// Block-level implementation.
pub mod block_api;

use cipher::BlockCipherEncrypt;
use digest::block_api::SmallBlockSizeUser;

digest::buffer_fixed!(
    /// Belt MAC instance generic over block cipher.
    #[derive(Clone)]
    pub struct GenericBeltMac<C: BlockCipherEncrypt + SmallBlockSizeUser>(block_api::BeltMacCore<C>);
    impl: ResetMacTraits AlgorithmName InnerInit;
);

/// Belt MAC instance.
pub type BeltMac = GenericBeltMac<belt_block::BeltBlock>;