How do I start at a different index point in a DAT data section?
Don M
Posts: 1,652
Let's say I have this in the DAT section:
I'm playing with the AES object and it only encrypts 16 bytes at a time. I want to encrypt the second 16 bytes so how do I index data_out to do the second set of 16 bytes? The data _out is always going to be 32 bytes long.
The command from the AES object is like this:
Thanks.
Don
data_out byte $32, $2e, $30, $30, $2c, $52, $30, $30, $43, $30, $30, $2c, $4d, $41, $43, $3a byte $30, $30, $30, $37, $38, $30, $37, $46, $41, $38, $44, $33, $00, $00, $00, $00
I'm playing with the AES object and it only encrypts 16 bytes at a time. I want to encrypt the second 16 bytes so how do I index data_out to do the second set of 16 bytes? The data _out is always going to be 32 bytes long.
The command from the AES object is like this:
aes.ECBEncrypt (@data_out, @ciphertext)
Thanks.
Don
Comments
BTW, you're making your life hard by translating the ASCII to hex by hand. Let the Spin compiler do that for you. Just enter your byte data as strings enclosed in quotes.
-Phil
data_out0[16] references the same element as data_out1[0].
Thanks Duane. That I already knew I could do but wanted just one data name to deal with.