Trying library from https://www.b4x.com/android/forum/threads/alice-aes-encryption.108364/
resulting error like this
what do i miss?
B4X:
Public Sub decryptThis(data() As Byte,pwd As String) As String
Dim bld As AliceContextBuilder
Dim ac As AliceConstants
bld.Initialize("")
bld.Algorithm = ac.AES
bld.Mode = ac.CTR
bld.MacAlgorithm = ac.HMAC_SHA_512
alice.Initialize("",bld.build)
Dim result() As Byte = alice.decryptBytes(data,pwd)
Return BytesToString(result,0,result.Length,"UTF8")
End Sub
B4X:
Error occurred on line: 13 (Decrypt)
java.lang.IllegalArgumentException: No enum constant com.rockaport.alice.AliceContext.MacAlgorithm.HmacSHA512
at java.base/java.lang.Enum.valueOf(Enum.java:240)
at com.rockaport.alice.AliceContext$MacAlgorithm.valueOf(AliceContext.java:280)
at de.donmanfred.AliceContextBuilderwrapper.setMacAlgorithm(AliceContextBuilderwrapper.java:51)
at com.bkn.smartgovadv.decrypt._dekrip(decrypt.java:57)
at com.bkn.smartgovadv.ws_ujiantest._getsoal(ws_ujiantest.java:243)
at com.bkn.smartgovadv.ws_ujiantest._websocket_connected(ws_ujiantest.java:447)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at anywheresoftware.b4j.object.WebSocketModule$Adapter$ThreadHandler.run(WebSocketModule.java:204)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:47)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:43)
at anywheresoftware.b4a.shell.ShellBA.startMessageLoop(ShellBA.java:121)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:180)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:309)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:98)
at com.bkn.smartgovadv.main.main(main.java:29)