MCPcopy Create free account
hub / github.com/RustCrypto/formats / encoded_len

Method encoded_len

der/src/encode.rs:76–78  ·  view source on GitHub ↗

Compute the length of this value in bytes when encoded as ASN.1 DER.

(&self)

Source from the content-addressed store, hash-verified

74{
75 /// Compute the length of this value in bytes when encoded as ASN.1 DER.
76 fn encoded_len(&self) -> Result<Length> {
77 self.value_len().and_then(|len| len.for_tlv())
78 }
79
80 /// Encode this value as ASN.1 DER using the provided [`Writer`].
81 fn encode(&self, writer: &mut dyn Writer) -> Result<()> {

Callers 2

encode_to_vecMethod · 0.45
to_pemMethod · 0.45

Calls 2

for_tlvMethod · 0.80
value_lenMethod · 0.45

Tested by

no test coverage detected