Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

obj-c question

 
   Soft32 Home -> Mac -> Programmer Help RSS
Next:  lost entourage  
Author Message
erikm

External


Since: Jul 07, 2009
Posts: 1



(Msg. 1) Posted: Tue Jul 07, 2009 10:11 am
Post subject: obj-c question
Archived from groups: comp>sys>mac>programmer>help (more info?)

I'm new to obj-c and was hoping for a pointer in the right direction.

I'm working with a calendaring project (SOGo) written in obj-c and it
inter-operates with MS Active Directory.

In order to change a password in AD, the new password has to be
formatted in a specific way. An example of how this is done in Java is
here:

# // Replace the "unicdodePwd" attribute with a new
value
# // Password must be both Unicode and a quoted string
# String newQuotedPassword = "\"" + newPassword + "\"";
# byte[] newUnicodePassword = newQuotedPassword.getBytes
("UTF-16LE");

My question is, how would one take an NSString object containting the
password and return it in the same format as above?

Thanks for any guidance.
Back to top
Login to vote
Reinder Verlinde

External


Since: Jul 23, 2007
Posts: 258



(Msg. 2) Posted: Tue Jul 07, 2009 1:20 pm
Post subject: Re: obj-c question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
<97348a7c-4833-4004-ae03-a3aa370dffc8.RemoveThis@i8g2000pro.googlegroups.com>,
erikm <erik.myllymaki.RemoveThis@gmail.com> wrote:

> I'm new to obj-c and was hoping for a pointer in the right direction.

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Clas
ses/NSString_Class/Reference/NSString.html>

> I'm working with a calendaring project (SOGo) written in obj-c and it
> inter-operates with MS Active Directory.
>
> In order to change a password in AD, the new password has to be
> formatted in a specific way. An example of how this is done in Java is
> here:
>
> # // Replace the "unicdodePwd" attribute with a new
> value
> # // Password must be both Unicode and a quoted string
> # String newQuotedPassword = "\"" + newPassword + "\"";
> # byte[] newUnicodePassword = newQuotedPassword.getBytes
> ("UTF-16LE");

NSString * newQuotedPassword =
[NSString stringWithFormat: @"\"%@\"", password];

char const * bytes = [newQuotedPassword
cStringUsingEncoding: NSUTF16LittleEndianStringEncoding];

Reinder
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Scrollbar question - Hi, Is there any Gestalt manager call to find out if the user have selected the scrollbar arrows to be adjacent rather...

NSOpenPanel question - Hi, I am a newbie programming a Cocoa app. I read in ..

databrowser question - The sample code for the databrowswer control shows a callback to set item data. here's an example from..

PB question - whenever i create a new file, PB inserts a comment at the top part of this comment is // Copyright (c) 2003..

StringToDate question - Hi, I'm trying to use StringToDate() function to convert date's into dateTime record which is in the US format. I..

newbe question - Hi Group, I am a C++ windows developer in Texas and I am about to start a new project. I am looking for a C++ Mac..
       Soft32 Home -> Mac -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
  Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]