I think it does not work yet.
crypt.Initialize("aaaaaaaaaaaaaaaa","6666666666666666")
d=File.Size (Main.outdir,fname)
Log (d)
' proves that the file exists
Dim data() As Byte = Bit.InputStreamToBytes(File.OpenInput(Main.outdir,fname))
t=Main.crypt.encrypt2 (data) ' error
Error occurred on line: 667 (Basis)
Message longer than Log limit (4000). Message was truncated.
java.lang.Exception: [encrypt] error:0607F08A:digital envelope routines:EVP_EncryptFinal_ex:data not multiple of block length
at de.donmanfred.MCrypt.encrypt2(MCrypt.java:55)
at de.donmanfred.CrypterWrapper.encrypt2(CrypterWrapper.java:61)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at it.giuseppe.salvi.PhotoGalleryViewActivity$1.onItemClick(PhotoGalleryViewActivity.java:83)
at android.widget.AdapterView.performItemClick(AdapterView.java:300)
at android.widget.Gallery.onSingleTapUp(Gallery.java:985)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:595)
at android.widget.Gallery.onTouchEvent(Gallery.java:962)
at android.view.View.dispatchTouchEvent(View.java:8393)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2426)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2158)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2432)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2432)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2432)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2432)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2172)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2314)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1692)
at android.app.Activity.dispatchTouchEvent(Activity.java:2749)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2275)
at android.view.View.dispatchPointerEvent(View.java:8583)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4091)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3957)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3509)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3562)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3528)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3638)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3536)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3695)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3509)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3562)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3528)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3536)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3509)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5806)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5745)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5716)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5896)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:192)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:143)
at android.os.Looper.loop(Looper.java:122)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Me
Message longer than Log limit (4000). Message was truncated.
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Method Crypt works
Dim teststring As String = "DonManfred"
Dim crypted As String = crypt.encrypt(teststring)
Log(crypted)
Dim t As String
t=hostname & "_decrypt.php?p=" & crypted
pjob.Download (t)
' php method works
Dim decrypted As String = crypt.decrypt(crypted)
Log(decrypted) ' this method works as well
But thanks a lot for trying!