ericcornelissen / NervousFish

An app for your :iphone: to exchange public-keys in a secure manner.
GNU Lesser General Public License v3.0
2 stars 4 forks source link

Improve implementation of keys to future proof code #113

Closed ericcornelissen closed 7 years ago

ericcornelissen commented 7 years ago

What

Replaced the static methods to create a new RSAKey or SimpleKey given a JsonReader with a constructor that accepts a Map that should contain the relevant keys.

Also added two new static methods to the RSAKey class which can be used to get the exponent and modulus of an RSAKey.

Why

The constructor change is a more intuitive solution for the problem and the RSAKey static methods for the exponent/modulus might become useful in the future for distributing keys to other apps.

How

You can run the unittests to verify that all the code in data_objects is still covered so it should work correctly

Alternative implementation

None

Notes

None