Trait rsa_cortex_m4::padding::Asn1Digest[][src]

pub trait Asn1Digest: Digest {
    const ASN1_PREFIX: &'static [u8];
}

ASN.1 prefixes for RSASSA-PKCS1-v1_5.

RSASSA-PKCS1-v1_5 likes to wrap its hashed message in an ASN.1 DigestInfo structure. This could have been done with just a byte but... Instead of including a DER-writer or even parser, we hardcode the requisite prefixes, and implement this trait for RustCrypto digest implementations. To use a different digest implementation, implement this trait for that implementation, using the public constants.

Associated Constants

const ASN1_PREFIX: &'static [u8][src]

Loading content...

Implementations on Foreign Types

impl Asn1Digest for Sha256[src]

impl Asn1Digest for Sha384[src]

impl Asn1Digest for Sha512[src]

Loading content...

Implementors

Loading content...