fn public_key_bytes(key_part: &ASN1Block) -> Result<Vec<u8>, KeyDerParsingError> {
        if let ASN1Block::BitString(_offset, bits_count, key_bytes) = key_part {
            if *bits_count != key_bytes.len() * 8 {
                return Err(Self::parsing_error("Inconsistent key length"));
            }
            Ok(key_bytes.to_vec())
        } else {
            Err(Self::parsing_error(&format!(
                "Expected BitString, got {:?}",
                key_part
            )))
        }
    }
/// Retrieves raw public key bytes from the given ASN1Block.
Retrieves raw public key bytes from the given ASN1Block.
Retrieves raw public key bytes from the given ASN1Block .
fn public_key_bytes(key_part: &ASN1Block) -> Result<Vec<u8>, KeyDerParsingError> {
        if let ASN1Block::BitString(_offset, bits_count, key_bytes) = key_part {
            if *bits_count != key_bytes.len() * 8 {
                return Err(Self::parsing_error("Inconsistent key length"));
            }
            Ok(key_bytes.to_vec())
        } else {
            Err(Self::parsing_error(&format!(
                "Expected BitString, got {:?}",
                key_part
            )))
        }
    }
fn public_key_bytes ( key_part : & ASN1Block ) -> Result < Vec < u8 > , KeyDerParsingError > { if let ASN1Block :: BitString ( _offset , bits_count , key_bytes ) = key_part { if * bits_count != key_bytes . len ( ) * 8 { return Err ( Self :: parsing_error ( " " ) ) ; } Ok ( key_bytes . to_vec ( ) ) } else { Err ( Self :: parsing_error ( & format ! ( " " key_part ) ) ) } }
Retrieves raw public key bytes from the given ASN1Block.
Retrieves raw public key bytes from the given ASN1Block .
key_part
&ASN1Block
key_part
&ASN1Block