Skip to content

ecdsaSignatureDerToRaw ​

ecdsaSignatureDerToRaw ​

Converts a DER ECDSA-Sig-Value (RFC 5480: SEQUENCE of INTEGERs r and s) to the fixed-width raw r || s encoding WebCrypto and JOSE use. Throws on malformed DER or integers too large for the curve.

ts
function ecdsaSignatureDerToRaw(
	signature: Uint8Array,
	curve: EcNamedCurve,
): Uint8Array

Parameters

Released under the MIT License.