https://github.com/laiso/CocoaWSSE
特になんの変哲もない感じのやつです。なかったので作りました。
クライアント向けにユーザー/パスワードからヘッダーの文字列を生成します。
NSMutableURLRequest* req = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://..."]]; [req setValue:[CocoaWSSE headerWithUsername:@"sample" password:@"passwd"] forHTTPHeaderField:@"X-WSSE"]; [NSURLConnection sendAsynchronousRequest:req queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *res, NSData *data, NSError *err) { // ... }];
既にnaoyaさんのrm-wsseがあるんですが、RubyMotion用のやつはObjective-Cコードから使えないので……
実装はkishikawakatsumiさんのhatena-touchのAtomPub APIのクライアントコードを参考にしました。