granoff/Lockbox — pull request #35 by bravedrake (2014-10-30 12:05:44+00:00)
Title: Custom Key Prefix

I've made some changes to allow for a custom key prefix to be specified, defaulting to the bundle id.

The reason for this is that I am working with iOS app extensions, which have different bundle id's from the main app, but which need access to the keychain of the main app for login credentials.

The implementation is possibly a bit controversial, as I have changed Lockbox to be instantiable. The [first commit](https://github.com/bravedrake/Lockbox/commit/f7663fd9ff3231764b06f94f3ff2c6aa7bbf5143) simply added a class method, but this seemed unsafe, as setting this after calling some of the setters would mean that the prefix would change, and the previously set key/value pair would be unaccessible. Making the class instantiable means that the prefix has to be set up front, and cannot be changed.