You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to encrypt using the public key of the String I have.
I got an error with parsePublicKeyFromPem.
Code
var helper = RsaKeyHelper();
// a base64 encoded pem string with correct headers and footers
final publicKeyString = '...';
final publicKey = helper.parsePublicKeyFromPem(publicKeyString);
Error
The following _CastError was thrown while handling a gesture:
type 'ASN1Object' is not a subtype of type 'ASN1Sequence' in type cast
When the exception was thrown, this was the stack:
#0 RsaKeyHelper.parsePublicKeyFromPem (package:rsa_encrypt/rsa_encrypt.dart:60:47)
#1 HomeScreenContent.build._openNotification (package:app/garage/pages/home/MY_SCREEN.dart:43:32)
#2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
#3 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1111:38)
#4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
I want to encrypt using the public key of the String I have.
I got an error with
parsePublicKeyFromPem
.Do you know the solution?
Thank you.
The text was updated successfully, but these errors were encountered: