Write code that cannot be exploited, and use iPhone's built-in security features. iOS provides a variety of security programming interfaces, including cryptographic services, the ability to read and verify certificates, a keychain for secure storage of passwords and cryptographic keys, a way to add a digital signature to data, and a function that returns cryptographically secure random numbers. In addition, iOS provides programming interfaces to SSL/TLS that developers can use to transport data securely over a network.