This module provides functions to convert between the raw signature bytes and the ASN.1 encoding of the signature.
Summary
Functions
Convert the raw signature bytes (r and s values) to the ASN.1 encoding of the signature.
Functions
Convert the raw signature bytes (r and s values) to the ASN.1 encoding of the signature.
Examples
iex> P11ex.ECSignature.recode_as_asn1(<<0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef>>)
{:ok, <<0x30, 0x24, 0x02, 0x01, 0x01, 0x02, 0x01, 0x02>>}
iex> P11ex.ECSignature.recode_as_asn1(<<0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01>>)
{:error, "Invalid signature size: 9"}