diff --git a/src/ArtTestApp/Activity1.cs b/src/ArtTestApp/Activity1.cs index 10968c43..6b366170 100644 --- a/src/ArtTestApp/Activity1.cs +++ b/src/ArtTestApp/Activity1.cs @@ -1,5 +1,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Security.Cryptography; using Android.App; using Android.Content; using Android.Content.PM; @@ -7,22 +9,27 @@ using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; -using KeeChallenge; -using KeePassLib.Serialization; -using keepass2android; -using keepass2android.Io; + +//using KeePassLib.Serialization; +using MasterPassword; +//using keepass2android; +//using keepass2android.Io; namespace ArtTestApp { [Activity(Label = "ArtTestApp", MainLauncher = true, Icon = "@drawable/icon")] public class Activity1 : Activity { - private ChallengeInfo _chalInfo; - private byte[] _challengeSecret; - private IOConnectionInfo _ioConnectionInfo; - private IOConnectionInfo _ioConnectionInfoOut; + //private IOConnectionInfo _ioConnectionInfo; + //private IOConnectionInfo _ioConnectionInfoOut; private const int RequestCodeChallengeYubikey = 98; + private static byte[] HashHMAC(byte[] key, byte[] message) + { + var hash = new HMACSHA256(key); + return hash.ComputeHash(message); + } + protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); @@ -30,20 +37,31 @@ namespace ArtTestApp // Set our view from the "main" layout resource SetContentView(Resource.Layout.Main); - _ioConnectionInfo = new IOConnectionInfo() { Path = "/mnt/sdcard/keepass/keechallenge.xml" }; + /*_ioConnectionInfo = new IOConnectionInfo() { Path = "/mnt/sdcard/keepass/keechallenge.xml" }; _ioConnectionInfoOut = new IOConnectionInfo() { Path = "/mnt/sdcard/keepass/keechallengeOut.xml" }; - + */ + + FindViewById