decode static method

Uint8List decode(
  1. String data,
  2. String expectedPrefix
)

Implementation

static Uint8List decode(String data, String expectedPrefix) {
  if (!data.startsWith(expectedPrefix)) {
    throw ArgumentError('Invalid PASERK format: expected $expectedPrefix');
  }
  final list = SafeBase64.decode(data.substring(expectedPrefix.length));
  return Uint8List.fromList(list);
}