open-keychain/open-keychain — pull request #606 by thi (2014-05-03 15:56:27+00:00)
Title: Introduce Key and KeyRing abstraction

Adding those classes without using them anywhere yet. In the hope that they can be used already for any refactoring endeavours going on or planned.

----
This allows code outside the pgp package to have a concept of
Key/KeyRing without knowing about bouncy-/spongycastle. It also
removes the need for a lot of static classes and helper functions
that retrieve key/keyring properties.

Furthermore it allows proper serialization of Key/KeyRing, allowing
them to be stored as arrays in parcels.

Lastly it combines public and secret key/keyring data in one object,
simplifying a lot of code. PublicKeyRing and SecretKeyRing subclasses
allow using specific types of KeyRings where needed for security
purposes (e.g. to make sure secret keyrings aren't exported like
public keyrings).