Closed pedroserretti closed 11 months ago
To resolve i'm using basic_utils
String arquivoXml = "...some xml string here..."
String sCert = "...some certificate string here..."
Uint8List dataBytes = Uint8List.fromList(utf8.encode(arquivoXml));
RSAPrivateKey rsaChavePrivada = CryptoUtils.rsaPrivateKeyFromPem(sCert);
Uint8List assinatura = CryptoUtils.rsaSign(rsaChavePrivada, dataBytes, algorithmName: 'SHA-1/RSA');
final digestValue = crypto.sha1.convert(assinatura);
String signatureValue = base64.encode(assinatura);
I'm trying to sign my XML, and i need the bytes from Signature object.
When debugging, signature have bytes in parameters, but i can't use it, how can i use the bytes from signature?