• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString XOR
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSString XOR
      • From: Fritz Anderson <email@hidden>
References: 
 >NSString XOR (From: Derrick Carlin <email@hidden>)
 >Re: NSString XOR (From: Fritz Anderson <email@hidden>)
 >Re: NSString XOR (From: Allan Hsu <email@hidden>)

  • Prev by Date: missing defaults plist file ?
  • Next by Date: Re: NSString XOR
  • Previous by thread: Re: NSString XOR
  • Next by thread: Re: NSString XOR
  • Index(es):
    • Date
    • Thread