However when using CryptoUtils.rsaPublicKeyFromPem(myPem); it throws an exception:
I/flutter ( 8208): ══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
I/flutter ( 8208): The following _CastError was thrown:
I/flutter ( 8208): type 'ASN1Sequence' is not a subtype of type 'ASN1Integer' in type cast
I/flutter ( 8208):
I/flutter ( 8208): When the exception was thrown, this was the stack:
I/flutter ( 8208): #0 CryptoUtils.rsaPublicKeyFromDERBytes CryptoUtils.dart:541
I/flutter ( 8208): #1 CryptoUtils.rsaPublicKeyFromPem CryptoUtils.dart:522
I'm trying to read the following public certificate (pem):
It contains a 3072 bit RSA public key.
However when using
CryptoUtils.rsaPublicKeyFromPem(myPem);
it throws an exception: