Re: NSString XOR
Re: NSString XOR
- Subject: Re: NSString XOR
- From: Kevin Ballard <email@hidden>
- Date: Sat, 16 Jul 2005 12:59:49 -0400
Erm, is that code legal? Doesn't the buffer array length have to be a
constant? Perhaps you should try something like:
UniChar *buffer = (UniChar *)calloc([string length], sizeof(UniChar));
[string getCharacters:buffer];
On Jul 15, 2005, at 9:21 PM, Allan Hsu wrote:
You can also get a Unicode character buffer from a string very
easily and then treat it as a byte array to perform your XOR
operation:
UniChar buffer[[string length]];
[string getCharacters:buffer];
Now you have a buffer of length ([string length] * sizeof(UniChar))
that you can do with as you like.
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden