Re: Byte array string operations

[ Follow Ups ] [ BasicCard User Forum ]

Posted by zeitcontrol ( on May 10, 2006 at 08:49:08:

In Reply to: Byte array string operations posted by ericc on May 09, 2006 at 09:58:21:

Hello Eric,

it may be more easy to directly use
Private DataArray as String*16
Private AESKey as String*16
Even with strings you can access each character of the string.
E.g. AESKey(1) will give access to first character of string.

I know no elegant method to convert a byte array to a string. There is a method to convert a single byte to a string character (respective string of length 1). This is: Chr$(b) whereby b is a byte and the return value is a string of length 1. The reverse operation is Asc(s$), whereby the first character of s$ is converted to the corresponding byte value.

You can find more details about this both functions in section "Built-in Functions" (chapter 3.16 within current edition) of BasicCard manual.

Michael Petig
ZeitControl cardsystems GmbH

Follow Ups:

[ Follow Ups ] [ BasicCard User Forum ]