Book Image

iOS Programming Cookbook

Book Image

iOS Programming Cookbook

Overview of this book

Do you want to understand all the facets of iOS programming and build complex iOS apps? Then you have come to the right place. This problem-solution guide will help you to eliminate expensive learning curves and focus on specific issues to make you proficient at tasks and the speed-up time involved. Beginning with some advanced UI components such as Stack Views and UICollectionView, you will gradually move on to building an interface efficiently. You will work through adding gesture recognizer and touch elements on table cells for custom actions. You will work with the Photos framework to access and manipulate photos. You will then prepare your app for multitasking and write responsive and highly efficient apps. Next, you will integrate maps and core location services while making your app more secure through various encryption methods. Finally, you will dive deep into the advanced techniques of implementing notifications while working with memory management and optimizing the performance of your apps. By the end of the book, you will master most of the latest iOS 10 frameworks.
Table of Contents (22 chapters)
iOS Programming Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Encryption


In the preceding section, we saw how to save data securely in Keychain. However, when saving information in Keychain or wherever you want, there is a chance that someone can get this information and that it will be exposed. The best practice when saving any sensitive information in your app or in the server side is for it to be encrypted and, when someone sees the encrypted message, they should not be able to decrypt it again. In this section, we will talk about the cryptographic hash functions.

Getting ready

The cryptographic hash function is a special type of hash function that can be used in cryptography. Using this hash function, you can convert any data (message) to another form of data (digest). These hash functions are meant to be one way and infeasible to be inverted. Let's see the properties of cryptographic hash functions:

  • The same messages always return the same digest (hash value)

  • Infeasible to revert the digest and get the message

  • Infeasible to find two messages with the...