Open zhoulijun12315 opened 3 years ago
we have the java code, like:
public static String rsaEncryptWithPublicKey(String s, java.security.PublicKey pub) throws GeneralSecurityException, UnsupportedEncodingException { javax.crypto.Cipher cipher = javax.crypto.Cipher.getInstance("RSA", "BC"); cipher.init(Cipher.ENCRYPT_MODE, pub, new javax.crypto.spec.OAEPParameterSpec("SHA3-256", "MGF1", MGF1ParameterSpec.SHA256, PP)); return bytesToString(cipher.doFinal(s.getBytes(StandardCharsets.UTF_8))); }
but, i don't know how to translated into dart
We have not implemented that algorithm. This is not a perfect port of BouncyCastle.
These compositions are tricky. I can look into adding it, but there's no guarantee of the timetable.
we have the java code, like:
but, i don't know how to translated into dart