huh DonManfred, you are a very clever man!
So the result:
#AdditionalJar: bcprov-jdk14-1.64.jar
...
Sub test
Dim nativeMe = Me As JavaObject
nativeMe.InitializeContext
Dim s As String = nativeMe.RunMethod("testSha3", Null)
Log(s)
End Sub
#if JAVA
import org.bouncycastle.jcajce.provider.digest.SHA3;
import org.bouncycastle.util.encoders.Hex;
public String testSha3() throws Exception {
String input = "Hello world !";
SHA3.DigestSHA3 digestSHA3 = new SHA3.Digest512();
byte[] digest = digestSHA3.digest(input.getBytes());
return "SHA3-512 = " + Hex.toHexString(digest);
}
#End If
the log:
SHA3-512 = e9a4fd120d684537d57f314d51213ce5acef8ff6974e2b7599674ef0f0a3cf111f0d26ed602db946739da448210fb76a7621d7a8f07728372b10a975f36d8e37
looks like it works.
I tried with a bcprov-jdk15on-1.64.jar also, but I got the error:
Convert byte code - optimized dex. Error
PARSE ERROR:
unsupported class file version 53.0
...while parsing META-INF/versions/9/module-info.class