fromData static method
Implementation
static X509Certificate fromData({required Uint8List data}) {
var decoded = utf8.decode(data, allowMalformed: true);
if (decoded.contains(X509Certificate.beginPemBlock)) {
return X509Certificate.fromPemData(pem: data);
} else {
return X509Certificate.fromDerData(der: data);
}
}