fromCertDer static method

(PublicKey, BigInt, BigInt) fromCertDer(
  1. Uint8List der, {
  2. required PublicKey signer,
})

Parses a public key from a DER-encoded certificate, verifying the signature.

Returns a tuple of (key, notBefore, notAfter) where notBefore and notAfter are Unix timestamps in seconds defining the certificate validity period.

Implementation

static (PublicKey, BigInt, BigInt) fromCertDer(
  Uint8List der, {
  required PublicKey signer,
}) {
  final (key, notBefore, notAfter) = ffi.XdsaPublicKey.fromCertDer(
    der: der,
    signer: signer._inner,
  );
  return (PublicKey._(key), notBefore, notAfter);
}