Added custom logger for better tracability of problems

This commit is contained in:
Philipp Crocoll
2013-07-06 16:10:33 +02:00
parent 4e8baf2b6a
commit 5f4d467da4
5 changed files with 67 additions and 6 deletions

View File

@@ -28,6 +28,7 @@ using KeePassLib.Native;
using KeePassLib.Resources;
using KeePassLib.Security;
using KeePassLib.Utility;
using keepass2android;
namespace KeePassLib.Keys
{
@@ -266,7 +267,7 @@ namespace KeePassLib.Keys
if (NativeLib.TransformKey256(pbNewKey, pbKeySeed32, uNumRounds))
{
sw.Stop();
Android.Util.Log.Debug("DEBUG", "Native transform:" +sw.ElapsedMilliseconds+"ms");
Kp2aLog.Log("Native transform:" +sw.ElapsedMilliseconds+"ms");
return pbNewKey;
}
@@ -274,7 +275,7 @@ namespace KeePassLib.Keys
if(TransformKeyManaged(pbNewKey, pbKeySeed32, uNumRounds) == false)
return null;
sw.Stop();
Android.Util.Log.Debug("DEBUG", "Managed transform:" +sw.ElapsedMilliseconds+"ms");
Kp2aLog.Log("Managed transform:" +sw.ElapsedMilliseconds+"ms");
SHA256Managed sha256 = new SHA256Managed();
return sha256.ComputeHash(pbNewKey);