implemented loading of files with KeepassXC Challenge (#4).

requires write support, handling of Challenge/Response errors (or user cancels). Caution: saving corrupts the file at the moment!
This commit is contained in:
Philipp Crocoll
2018-04-10 07:15:19 +02:00
parent cdbb492f2c
commit f14aad0c50
10 changed files with 265 additions and 169 deletions

View File

@@ -55,7 +55,10 @@ namespace KeePassLib.Cryptography.KeyDerivation
get { return "AES-KDF"; }
}
public AesKdf()
public override byte[] GetSeed(KdfParameters p)
{ return p.GetByteArray(ParamSeed); }
public AesKdf()
{
}

View File

@@ -68,7 +68,10 @@ namespace KeePassLib.Cryptography.KeyDerivation
get { return "Argon2"; }
}
public Argon2Kdf()
public override byte[] GetSeed(KdfParameters p)
{ return p.GetByteArray(ParamSalt); }
public Argon2Kdf()
{
}

View File

@@ -36,7 +36,9 @@ namespace KeePassLib.Cryptography.KeyDerivation
get;
}
public virtual KdfParameters GetDefaultParameters()
public abstract byte[] GetSeed(KdfParameters p);
public virtual KdfParameters GetDefaultParameters()
{
return new KdfParameters(this.Uuid);
}