decodeFirstPem static method

Uint8List decodeFirstPem(
  1. String pem,
  2. String label
)

Decodes the first PEM block matching label.

Implementation

static Uint8List decodeFirstPem(String pem, String label) {
  final blocks = decodePemBlocks(pem, label);
  if (blocks.isEmpty) {
    throw ArgumentError('Nenhum bloco PEM $label encontrado.');
  }
  return blocks.first;
}