MiniKeePass/MiniKeePass — pull request #344 by markhewett (2014-12-05 22:58:10+00:00)
Title: Added basic support for OTP generation based on the KeeOTP data format

I've been sitting on this code for a while, so it's probably time for some feedback. Not sure it's totally ready to be merged - I'm still not that comfortable with ObjC, so some code review would be required, and there are some cosmetic issues that could probably be fixed.

This adds support for displaying one time passwords, as requested in issue #225, using the KeeOTP format (I believe!) for data. e.g.

key=PEHMPSDNLXIOG65U&step=30&size=6

Only `key` is required, step defaults to 30 and size to 6. This data can be in the notes (for kdb and kdbx files) or in a string field (kdbx only). In the notes, it has to be prefixed with `otp:`, and the string field name has to be `otp`. A QR code for the above key can be found on [this page](https://www.idontplaydarts.com/2011/07/google-totp-two-factor-authentication-for-php/) if you want to compare the values to another OTP generator.

I branched [aerogear-otp-ios](https://github.com/markhewett/aerogear-otp-ios) to add support for the things I needed and added that as a submodule (hopefully that part is correct, I'm not comfortable with Git either!).

Here's what it looks like in a kdb file:
![screen shot 2014-12-05 at 4 39 03 pm](https://cloud.githubusercontent.com/assets/1621581/5324345/2bfdd536-7c9f-11e4-9318-636c11c34a45.png)

Here's the same entry when the OTP is about to expire:
![screen shot 2014-12-05 at 4 39 24 pm](https://cloud.githubusercontent.com/assets/1621581/5324351/3e6f4c22-7c9f-11e4-94f5-c2bbc06f1340.png)

Here's what it looks like in a kdbx file:
![screen shot 2014-12-05 at 4 40 01 pm](https://cloud.githubusercontent.com/assets/1621581/5324357/4d521e7c-7c9f-11e4-84e6-704b1096ed78.png)

As you can see, the alignment of the "clock" icon is a bit off, but I'm not sure how to fix that.

I did add a new button in the browser to paste the OTP, but it needs a new icon, instead of the duplicate asterisk:
![screen shot 2014-12-05 at 4 40 17 pm](https://cloud.githubusercontent.com/assets/1621581/5324363/5fb8acac-7c9f-11e4-9b92-16ec520cd10c.png)

Let me know what you think - what improvements need to be made, or if you don't want to add this, etc.