B4R Question Byte array fixed length via C vs. dynamic length

KMatle

Expert
Licensed User
Longtime User
Maybe there's a better thread title.

I use a fixed byte array

B4X:
Public aesdecrypted(256) As Byte

which I use to en-/decrypt data via C native code which runs like a charm. Problem here is that it of course always uses 256 bytes even if the data is shorter (filled with zero bytes). I then copy it to a new byte array with the real length.

Question: Is there a better way? (dynamic allocation or similar)
 
Top