© 2013 All rights reserved.
0

Objective-C: Creating sha1 byte array

I solved an interesting problem that I needed to create a SHA1 hash, but the result had to be a byte array.

I needed to do in Objective-C function that will return the same result as the following C# code:

 

The main problem is in selecting the correct encoding, and convert input string. Here is final function:

Comments (0)

No comments yet, but you can be the first..

Add comment

About
Hi, i am programmer from the Czech Republic. I love web development (Ruby, Ruby on Rails, PHP, Nette) and iOS development (Objective-C, Cocoa).
To cooperate, here is my phone:
+420 608 836