Skip to main content

decode_signature_der

Function decode_signature_der 

Source
pub fn decode_signature_der(
    der: &[u8],
    raw_out: &mut [u8],
) -> Result<(), EcdsaError>
Expand description

Decodes an ECDSA-Sig-Value DER structure into raw_out.

raw_out receives r || s, each zero-padded to half of its length. It must be non-empty and even.

Returns EcdsaError when the DER is malformed, when an integer is negative or too large for its half of the output, or when the lengths are inconsistent.