Convert [UInt8] to Int

I am not so familiar with unsafe pointer, I think I would need to read about it.

We are using big endian, so what should be the changes in the above code ?