DwarDoh
DwarDoh

Reputation: 572

How to base64url Encode Strings in Cocoa Touch

Is there a library function/method/class in Cocoa Touch for base64url encoding strings?

Upvotes: 0

Views: 974

Answers (1)

Itai Ferber
Itai Ferber

Reputation: 29918

While there isn't a standard way to do this with the Apple frameworks, you should certainly check out CocoaDev's entry and discussion on the topic: BaseSixtyFour. They have plenty of ways to work this out, and the last comment there doesn't require libcrypto, or any external frameworks (which, on iOS, is a good start). It's definitely worth a look.

Update: Or even better, check out Base64 encoding options on Mac and iPhone on CocoaWithLove, as it includes excellent source code.

Upvotes: 7

Related Questions