in reply to Re^2: AES Interoperability between Perl and C#
in thread AES Interoperability between Perl and C#
There's two common ways of storing a string.
1) NUL-terminated.
The end of the string is marked by the first occurance of a NUL character.
Pro: The string can be of any length.
Con: The string cannot contain NULs.
2) PASCAL string.
Named after the programming language. The length of the string is stored along with the string itself.
Pro: The string can contain any character.
Con: The size of the length field limits the size of the string.
Thelonius chose the latter. And in this case, the limit on the string length is (2^32)-1 (over 2 billion) since he's using a 32 bit signed int for the length field.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: AES Interoperability between Perl and C#
by jpfarmer (Pilgrim) on Nov 17, 2005 at 22:32 UTC | |
by ikegami (Patriarch) on Nov 17, 2005 at 22:49 UTC |