Hello Community,
I'm using PB 12.1 6639
I have a datatype related problem.
I have to AES-encrypt a Byte Array. For encrypting i use a third Party activeX (Crypt2 from Chilkat Software).
There is a function byte[] EncryptBytes(Byte data[]).
The value i have to crypt is a Long encoded as a signed two complement (big endian) (=Java Long).
For example a Long value of 102400 is stored in a Byte Array in that way:
Byte[1] = 1
Byte[2] = -112
Byte[3] = 0
And here starts the Trouble. PB's Byte datatype is a unsigned datatype and can hold only positive Byte values.
I also tried using a blob variable instead of a Byte Array (the function EncryptBytes takes it without error), but on Setting up
the data in the blob variable using Setbyte(blob, n, byte)-function there is the same problem that Setbyte only can handle positive Byte values.
So the question is how to incorporate negative Byte values into a Byte Array or a blob!
Hope somebody can help me.
Regards Martin