mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
WIP KeePassLibPCL
This commit is contained in:
@@ -25,7 +25,8 @@ using System.Security;
|
||||
using System.Diagnostics;
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
#else
|
||||
|
||||
#if !KeePassRT
|
||||
@@ -124,7 +125,7 @@ namespace ModernKeePassLibPCL.Cryptography.Cipher
|
||||
Array.Copy(pbKey, pbLocalKey, 32);
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.
|
||||
/*var provider = WinRTCrypto.SymmetricKeyAlgorithmProvider.
|
||||
OpenAlgorithm(SymmetricAlgorithm.AesCbcPkcs7);
|
||||
var key = provider.CreateSymmetricKey(pbLocalKey);
|
||||
if (bEncrypt)
|
||||
@@ -138,6 +139,27 @@ namespace ModernKeePassLibPCL.Cryptography.Cipher
|
||||
key, pbLocalIV);
|
||||
return new CryptoStream(s, decryptor, CryptoStreamMode.Read);
|
||||
}
|
||||
*/
|
||||
var provider = SymmetricKeyAlgorithmProvider.
|
||||
OpenAlgorithm(SymmetricAlgorithmNames.AesCbcPkcs7);
|
||||
var key = provider.CreateSymmetricKey(CryptographicBuffer.CreateFromByteArray(pbLocalKey));
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
s.CopyTo(ms);
|
||||
var data = CryptographicBuffer.CreateFromByteArray(ms.ToArray());
|
||||
byte[] resultByteArray;
|
||||
if (bEncrypt)
|
||||
{
|
||||
var encrypted = CryptographicEngine.Encrypt(key, data, CryptographicBuffer.CreateFromByteArray(pbLocalIV));
|
||||
CryptographicBuffer.CopyToByteArray(encrypted, out resultByteArray);
|
||||
}
|
||||
else
|
||||
{
|
||||
var decrypted = CryptographicEngine.Decrypt(key, data, CryptographicBuffer.CreateFromByteArray(pbLocalIV));
|
||||
CryptographicBuffer.CopyToByteArray(decrypted, out resultByteArray);
|
||||
}
|
||||
return new MemoryStream(resultByteArray, true);
|
||||
}
|
||||
#else
|
||||
|
||||
#if !KeePassRT
|
||||
@@ -175,7 +197,7 @@ namespace ModernKeePassLibPCL.Cryptography.Cipher
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public Stream EncryptStream(Stream sPlainText, byte[] pbKey, byte[] pbIV)
|
||||
{
|
||||
|
@@ -20,7 +20,7 @@
|
||||
using System;
|
||||
using System.Security;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -29,6 +29,7 @@ using System.Diagnostics;
|
||||
|
||||
using ModernKeePassLibPCL.Native;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Cryptography
|
||||
{
|
||||
@@ -42,7 +43,7 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
private byte[] m_pbEntropyPool = new byte[64];
|
||||
private uint m_uCounter;
|
||||
#if ModernKeePassLibPCL
|
||||
private IRandomNumberGenerator m_rng = NetFxCrypto.RandomNumberGenerator;
|
||||
//private IRandomNumberGenerator m_rng = NetFxCrypto.RandomNumberGenerator;
|
||||
#else
|
||||
private RNGCryptoServiceProvider m_rng = new RNGCryptoServiceProvider();
|
||||
#endif
|
||||
@@ -107,8 +108,11 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
if(pbEntropy.Length >= 64)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var shaNew = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha512);
|
||||
pbNewData = shaNew.HashData(pbEntropy);
|
||||
/*var shaNew = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha512);
|
||||
pbNewData = shaNew.HashData(pbEntropy);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbEntropy));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbNewData);
|
||||
#else
|
||||
|
||||
#if !KeePassLibSD
|
||||
@@ -119,7 +123,7 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
pbNewData = shaNew.ComputeHash(pbEntropy);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
MemoryStream ms = new MemoryStream();
|
||||
lock(m_oSyncRoot)
|
||||
@@ -129,8 +133,11 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
|
||||
byte[] pbFinal = ms.ToArray();
|
||||
#if ModernKeePassLibPCL
|
||||
var shaPool = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha512);
|
||||
m_pbEntropyPool = shaPool.HashData(pbFinal);
|
||||
/*var shaPool = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha512);
|
||||
m_pbEntropyPool = shaPool.HashData(pbFinal);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbFinal));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out m_pbEntropyPool);
|
||||
#else
|
||||
|
||||
#if !KeePassLibSD
|
||||
@@ -142,7 +149,7 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
m_pbEntropyPool = shaPool.ComputeHash(pbFinal);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
ms.Dispose();
|
||||
}
|
||||
|
||||
@@ -250,7 +257,8 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
private byte[] GetCspData()
|
||||
{
|
||||
byte[] pbCspRandom = new byte[32];
|
||||
m_rng.GetBytes(pbCspRandom);
|
||||
//m_rng.GetBytes(pbCspRandom);
|
||||
CryptographicBuffer.CopyToByteArray(CryptographicBuffer.GenerateRandom(32), out pbCspRandom);
|
||||
return pbCspRandom;
|
||||
}
|
||||
|
||||
@@ -280,13 +288,18 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
}
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
return sha256.HashData(pbFinal);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
return sha256.HashData(pbFinal);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbFinal));
|
||||
byte[] result;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out result);
|
||||
return result;
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
return sha256.ComputeHash(pbFinal);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a number of cryptographically strong random bytes.
|
||||
|
@@ -19,8 +19,9 @@
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -116,13 +117,17 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
else if(genAlgorithm == CrsAlgorithm.Salsa20)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbKey32 = sha256.HashData(pbKey);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbKey32 = sha256.HashData(pbKey);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbKey));
|
||||
byte[] pbKey32;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbKey32);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] pbKey32 = sha256.ComputeHash(pbKey);
|
||||
#endif
|
||||
byte[] pbIV = new byte[8] { 0xE8, 0x30, 0x09, 0x4B,
|
||||
byte[] pbIV = new byte[8] { 0xE8, 0x30, 0x09, 0x4B,
|
||||
0x97, 0x20, 0x5D, 0x2A }; // Unique constant
|
||||
|
||||
m_salsa20 = new Salsa20Cipher(pbKey32, pbIV);
|
||||
|
@@ -22,13 +22,14 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
using System.Diagnostics;
|
||||
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Cryptography
|
||||
{
|
||||
@@ -37,7 +38,8 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
private Stream m_sBaseStream;
|
||||
private bool m_bWriting;
|
||||
#if ModernKeePassLibPCL
|
||||
private ICryptoTransform m_hash;
|
||||
//private ICryptoTransform m_hash;
|
||||
private CryptographicHash m_hash;
|
||||
#else
|
||||
private HashAlgorithm m_hash;
|
||||
#endif
|
||||
@@ -76,18 +78,20 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
}
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
public HashingStreamEx(Stream sBaseStream, bool bWriting, HashAlgorithm? hashAlgorithm)
|
||||
//public HashingStreamEx(Stream sBaseStream, bool bWriting, HashAlgorithm? hashAlgorithm)
|
||||
public HashingStreamEx(Stream sBaseStream, bool bWriting, string hashAlgorithm)
|
||||
#else
|
||||
public HashingStreamEx(Stream sBaseStream, bool bWriting, HashAlgorithm hashAlgorithm)
|
||||
#endif
|
||||
{
|
||||
{
|
||||
if(sBaseStream == null)
|
||||
throw new ArgumentNullException("sBaseStream");
|
||||
|
||||
m_sBaseStream = sBaseStream;
|
||||
m_bWriting = bWriting;
|
||||
#if ModernKeePassLibPCL
|
||||
m_hash = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(hashAlgorithm ?? HashAlgorithm.Sha256).CreateHash();
|
||||
//m_hash = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(hashAlgorithm ?? HashAlgorithm.Sha256).CreateHash();
|
||||
m_hash = HashAlgorithmProvider.OpenAlgorithm(hashAlgorithm ?? HashAlgorithmNames.Sha256).CreateHash();
|
||||
#elif !KeePassLibSD
|
||||
m_hash = (hashAlgorithm ?? new SHA256Managed());
|
||||
#else // KeePassLibSD
|
||||
@@ -98,17 +102,17 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
try { if(m_hash == null) m_hash = HashAlgorithm.Create(); }
|
||||
catch(Exception) { }
|
||||
#endif
|
||||
if(m_hash == null) { Debug.Assert(false); return; }
|
||||
if (m_hash == null) { Debug.Assert(false); return; }
|
||||
|
||||
// Validate hash algorithm
|
||||
if((!m_hash.CanReuseTransform) || (!m_hash.CanTransformMultipleBlocks) ||
|
||||
/*if((!m_hash.CanReuseTransform) || (!m_hash.CanTransformMultipleBlocks) ||
|
||||
(m_hash.InputBlockSize != 1) || (m_hash.OutputBlockSize != 1))
|
||||
{
|
||||
#if false && DEBUG
|
||||
MessageService.ShowWarning("Broken HashAlgorithm object in HashingStreamEx.");
|
||||
#endif
|
||||
m_hash = null;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
public override void Flush()
|
||||
@@ -128,13 +132,14 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
{
|
||||
try
|
||||
{
|
||||
m_hash.TransformFinalBlock(new byte[0], 0, 0);
|
||||
//m_hash.TransformFinalBlock(new byte[0], 0, 0);
|
||||
#if ModernKeePassLibPCL
|
||||
m_pbFinalHash = (m_hash as CryptographicHash).GetValueAndReset ();
|
||||
//m_pbFinalHash = (m_hash as CryptographicHash).GetValueAndReset ();
|
||||
CryptographicBuffer.CopyToByteArray(m_hash.GetValueAndReset(), out m_pbFinalHash);
|
||||
#else
|
||||
m_pbFinalHash = m_hash.Hash;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
catch(Exception) { Debug.Assert(false); }
|
||||
|
||||
m_hash = null;
|
||||
@@ -172,10 +177,11 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
#endif
|
||||
|
||||
if((m_hash != null) && (nRead > 0))
|
||||
m_hash.TransformBlock(pbBuffer, nOffset, nRead, pbBuffer, nOffset);
|
||||
//m_hash.TransformBlock(pbBuffer, nOffset, nRead, pbBuffer, nOffset);
|
||||
m_hash.Append(CryptographicBuffer.CreateFromByteArray(pbBuffer));
|
||||
|
||||
#if DEBUG
|
||||
Debug.Assert(MemUtil.ArraysEqual(pbBuffer, pbOrg));
|
||||
Debug.Assert(MemUtil.ArraysEqual(pbBuffer, pbOrg));
|
||||
#endif
|
||||
|
||||
return nRead;
|
||||
@@ -190,8 +196,9 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
Array.Copy(pbBuffer, pbOrg, pbBuffer.Length);
|
||||
#endif
|
||||
|
||||
if((m_hash != null) && (nCount > 0))
|
||||
m_hash.TransformBlock(pbBuffer, nOffset, nCount, pbBuffer, nOffset);
|
||||
if ((m_hash != null) && (nCount > 0))
|
||||
//m_hash.TransformBlock(pbBuffer, nOffset, nCount, pbBuffer, nOffset);
|
||||
m_hash.Append(CryptographicBuffer.CreateFromByteArray(pbBuffer));
|
||||
|
||||
#if DEBUG
|
||||
Debug.Assert(MemUtil.ArraysEqual(pbBuffer, pbOrg));
|
||||
|
@@ -21,13 +21,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
using System.Globalization;
|
||||
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
#if (!KeePassLibSD && !KeePassRT)
|
||||
namespace ModernKeePassLibPCL.Cryptography
|
||||
@@ -47,15 +48,19 @@ namespace ModernKeePassLibPCL.Cryptography
|
||||
Array.Reverse(pbText); // Big-Endian
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var hsha1 = WinRTCrypto.MacAlgorithmProvider.OpenAlgorithm(MacAlgorithm.HmacSha1).CreateHash(pbSecret);
|
||||
/*var hsha1 = WinRTCrypto.MacAlgorithmProvider.OpenAlgorithm(MacAlgorithm.HmacSha1).CreateHash(pbSecret);
|
||||
hsha1.Append(pbText);
|
||||
var pbHash = hsha1.GetValueAndReset();
|
||||
var pbHash = hsha1.GetValueAndReset();*/
|
||||
var hsha1 = MacAlgorithmProvider.OpenAlgorithm(MacAlgorithmNames.HmacSha1).CreateHash(CryptographicBuffer.CreateFromByteArray(pbSecret));
|
||||
hsha1.Append(CryptographicBuffer.CreateFromByteArray(pbText));
|
||||
byte[] pbHash;
|
||||
CryptographicBuffer.CopyToByteArray(hsha1.GetValueAndReset(), out pbHash);
|
||||
#else
|
||||
HMACSHA1 hsha1 = new HMACSHA1(pbSecret);
|
||||
byte[] pbHash = hsha1.ComputeHash(pbText);
|
||||
#endif
|
||||
|
||||
uint uOffset = (uint)(pbHash[pbHash.Length - 1] & 0xF);
|
||||
uint uOffset = (uint)(pbHash[pbHash.Length - 1] & 0xF);
|
||||
if((iTruncationOffset >= 0) && (iTruncationOffset < (pbHash.Length - 4)))
|
||||
uOffset = (uint)iTruncationOffset;
|
||||
|
||||
|
@@ -21,7 +21,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
|
@@ -23,7 +23,7 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -37,6 +37,8 @@ using ModernKeePassLibPCL.Native;
|
||||
using ModernKeePassLibPCL.Resources;
|
||||
using ModernKeePassLibPCL.Security;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
using Windows.Storage.Streams;
|
||||
|
||||
namespace ModernKeePassLibPCL.Keys
|
||||
{
|
||||
@@ -178,13 +180,17 @@ namespace ModernKeePassLibPCL.Keys
|
||||
}
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbHash = sha256.HashData(ms.ToArray());
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbHash = sha256.HashData(ms.ToArray());*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(ms.ToArray()));
|
||||
byte[] pbHash;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbHash);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] pbHash = sha256.ComputeHash(ms.ToArray());
|
||||
#endif
|
||||
ms.Dispose();
|
||||
ms.Dispose();
|
||||
return pbHash;
|
||||
}
|
||||
|
||||
@@ -284,13 +290,18 @@ namespace ModernKeePassLibPCL.Keys
|
||||
return null;
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
return sha256.HashData(pbNewKey);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
return sha256.HashData(pbNewKey);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
byte[] result;
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbNewKey));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out result);
|
||||
return result;
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
return sha256.ComputeHash(pbNewKey);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TransformKeyManaged(byte[] pbNewKey32, byte[] pbKeySeed32,
|
||||
ulong uNumRounds)
|
||||
@@ -307,9 +318,12 @@ namespace ModernKeePassLibPCL.Keys
|
||||
}
|
||||
#else
|
||||
#if ModernKeePassLibPCL
|
||||
var aes = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesEcb);
|
||||
/*var aes = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesEcb);
|
||||
var key = aes.CreateSymmetricKey(pbKeySeed32);
|
||||
var iCrypt = WinRTCrypto.CryptographicEngine.CreateEncryptor(key);
|
||||
var iCrypt = WinRTCrypto.CryptographicEngine.CreateEncryptor(key);*/
|
||||
var aes = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesEcb);
|
||||
var key = aes.CreateSymmetricKey(CryptographicBuffer.CreateFromByteArray(pbKeySeed32));
|
||||
|
||||
#else
|
||||
byte[] pbIV = new byte[16];
|
||||
Array.Clear(pbIV, 0, pbIV.Length);
|
||||
@@ -328,8 +342,8 @@ namespace ModernKeePassLibPCL.Keys
|
||||
ICryptoTransform iCrypt = r.CreateEncryptor();
|
||||
#endif
|
||||
|
||||
// !iCrypt.CanReuseTransform -- doesn't work with Mono
|
||||
if((iCrypt == null) || (iCrypt.InputBlockSize != 16) ||
|
||||
// !iCrypt.CanReuseTransform -- doesn't work with Mono
|
||||
if ((iCrypt == null) || (iCrypt.InputBlockSize != 16) ||
|
||||
(iCrypt.OutputBlockSize != 16))
|
||||
{
|
||||
Debug.Assert(false, "Invalid ICryptoTransform.");
|
||||
@@ -384,9 +398,12 @@ namespace ModernKeePassLibPCL.Keys
|
||||
aes.Init(true, kp);
|
||||
#else
|
||||
#if ModernKeePassLibPCL
|
||||
var aes = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesEcb);
|
||||
/*var aes = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesEcb);
|
||||
var key = aes.CreateSymmetricKey(pbKey);
|
||||
var iCrypt = WinRTCrypto.CryptographicEngine.CreateEncryptor(key);
|
||||
var iCrypt = WinRTCrypto.CryptographicEngine.CreateEncryptor(key);*/
|
||||
var aes = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesEcb);
|
||||
var key = aes.CreateSymmetricKey(CryptographicBuffer.CreateFromByteArray(pbKey));
|
||||
|
||||
#else
|
||||
byte[] pbIV = new byte[16];
|
||||
Array.Clear(pbIV, 0, pbIV.Length);
|
||||
|
@@ -22,13 +22,14 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
|
||||
using ModernKeePassLibPCL.Security;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Keys
|
||||
{
|
||||
@@ -60,13 +61,17 @@ namespace ModernKeePassLibPCL.Keys
|
||||
if(bPerformHash)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbRaw = sha256.HashData(pbKeyData);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbRaw = sha256.HashData(pbKeyData);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbKeyData));
|
||||
byte[] pbRaw;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbRaw);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] pbRaw = sha256.ComputeHash(pbKeyData);
|
||||
#endif
|
||||
m_pbKey = new ProtectedBinary(true, pbRaw);
|
||||
m_pbKey = new ProtectedBinary(true, pbRaw);
|
||||
}
|
||||
else m_pbKey = new ProtectedBinary(true, pbKeyData);
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ using System.Security;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -37,6 +37,7 @@ using ModernKeePassLibPCL.Resources;
|
||||
using ModernKeePassLibPCL.Security;
|
||||
using ModernKeePassLibPCL.Serialization;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Keys
|
||||
{
|
||||
@@ -139,13 +140,16 @@ namespace ModernKeePassLibPCL.Keys
|
||||
if(pbKey == null)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
pbKey = sha256.HashData(pbFileData);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
pbKey = sha256.HashData(pbFileData);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbFileData));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbKey);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
pbKey = sha256.ComputeHash(pbFileData);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return pbKey;
|
||||
}
|
||||
@@ -203,13 +207,16 @@ namespace ModernKeePassLibPCL.Keys
|
||||
ms.Write(pbKey32, 0, 32);
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
pbFinalKey32 = sha256.HashData(ms.ToArray());
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
pbFinalKey32 = sha256.HashData(ms.ToArray());*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(ms.ToArray()));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbFinalKey32);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
pbFinalKey32 = sha256.ComputeHash(ms.ToArray());
|
||||
#endif
|
||||
ms.Dispose();
|
||||
ms.Dispose();
|
||||
}
|
||||
|
||||
CreateXmlKeyFile(strFilePath, pbFinalKey32);
|
||||
|
@@ -21,13 +21,14 @@ using System;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
|
||||
using ModernKeePassLibPCL.Security;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Keys
|
||||
{
|
||||
@@ -73,14 +74,18 @@ namespace ModernKeePassLibPCL.Keys
|
||||
if(pbPasswordUtf8 == null) throw new ArgumentNullException("pbPasswordUtf8");
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbRaw = sha256.HashData(pbPasswordUtf8);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbRaw = sha256.HashData(pbPasswordUtf8);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbPasswordUtf8));
|
||||
byte[] pbRaw;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbRaw);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] pbRaw = sha256.ComputeHash(pbPasswordUtf8);
|
||||
#endif
|
||||
|
||||
m_psPassword = new ProtectedString(true, pbPasswordUtf8);
|
||||
m_psPassword = new ProtectedString(true, pbPasswordUtf8);
|
||||
m_pbKeyData = new ProtectedBinary(true, pbRaw);
|
||||
}
|
||||
|
||||
|
@@ -15,12 +15,13 @@
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<TargetFrameworkProfile>Profile151</TargetFrameworkProfile>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
||||
<AssemblyOriginatorKeyFile>KeePassLib.pfx</AssemblyOriginatorKeyFile>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
|
||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -120,8 +121,8 @@
|
||||
<None Include="KeePassLib.pfx" />
|
||||
<None Include="Libs\Windows.winmd" />
|
||||
<None Include="ModernKeePassLibPCL.nuspec" />
|
||||
<None Include="project.json" />
|
||||
<None Include="Utility\MessageService.cs" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Native\NativeLib.cs" />
|
||||
<None Include="Native\NativeMethods.cs" />
|
||||
<None Include="Native\NativeMethods.Unix.cs" />
|
||||
@@ -148,33 +149,6 @@
|
||||
</MonoDevelop>
|
||||
</ProjectExtensions>
|
||||
<ItemGroup>
|
||||
<Reference Include="PCLCrypto, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d4421c8a4786956c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PCLCrypto.2.0.147\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\PCLCrypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLStorage">
|
||||
<HintPath>..\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PCLStorage.Abstractions">
|
||||
<HintPath>..\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.BCrypt, Version=0.5.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PInvoke.BCrypt.0.5.97\lib\portable-net45+win8+wpa81\PInvoke.BCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Kernel32, Version=0.5.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PInvoke.Kernel32.0.5.97\lib\portable-net45+win8+wpa81\PInvoke.Kernel32.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.NCrypt, Version=0.5.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PInvoke.NCrypt.0.5.97\lib\portable-net45+win8+wpa81\PInvoke.NCrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PInvoke.Windows.Core, Version=0.5.0.0, Culture=neutral, PublicKeyToken=9e300f9f87f04a7a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PInvoke.Windows.Core.0.5.97\lib\portable-net45+win8+wpa81\PInvoke.Windows.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Splat, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Splat.2.0.0\lib\netstandard1.1\Splat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Validation, Version=2.4.0.0, Culture=neutral, PublicKeyToken=2fc06f0d701809a7, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Validation.2.4.15\lib\portable-net45+win8+wp8+wpa81\Validation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Windows, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>Libs\Windows.winmd</HintPath>
|
||||
|
9
ModernKeePassLib/ModernKeePassLibPCL.nuget.targets
Normal file
9
ModernKeePassLib/ModernKeePassLibPCL.nuget.targets
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(NuGetPackageRoot)' == ''">
|
||||
<NuGetPackageRoot>$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
</PropertyGroup>
|
||||
<ImportGroup>
|
||||
<Import Project="$(NuGetPackageRoot)\Microsoft.Bcl.Build\1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('$(NuGetPackageRoot)\Microsoft.Bcl.Build\1.0.21\build\Microsoft.Bcl.Build.targets')" />
|
||||
</ImportGroup>
|
||||
</Project>
|
@@ -21,7 +21,7 @@ using System;
|
||||
using System.IO;
|
||||
#if ModernKeePassLibPCL
|
||||
using System.Linq;
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -30,6 +30,7 @@ using System.Text;
|
||||
|
||||
using ModernKeePassLibPCL.Native;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
#if KeePassLibSD
|
||||
using KeePassLibSD;
|
||||
@@ -251,13 +252,17 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
if(m_bVerify)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbComputedHash = sha256.HashData(m_pbBuffer);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbComputedHash = sha256.HashData(m_pbBuffer);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(m_pbBuffer));
|
||||
byte[] pbComputedHash;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbComputedHash);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] pbComputedHash = sha256.ComputeHash(m_pbBuffer);
|
||||
#endif
|
||||
if((pbComputedHash == null) || (pbComputedHash.Length != 32))
|
||||
if ((pbComputedHash == null) || (pbComputedHash.Length != 32))
|
||||
throw new InvalidOperationException();
|
||||
|
||||
for(int iHashPos = 0; iHashPos < 32; ++iHashPos)
|
||||
@@ -298,8 +303,12 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
if(m_nBufferPos > 0)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbHash = sha256.HashData(m_pbBuffer.Where((x, i) => i < m_nBufferPos).ToArray());
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var pbHash = sha256.HashData(m_pbBuffer.Where((x, i) => i < m_nBufferPos).ToArray());*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(m_pbBuffer.Where((x, i) => i < m_nBufferPos).ToArray()));
|
||||
byte[] pbHash;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out pbHash);
|
||||
#else
|
||||
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
@@ -320,7 +329,7 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
|
||||
#endif
|
||||
|
||||
m_bwOutput.Write(pbHash);
|
||||
m_bwOutput.Write(pbHash);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -34,7 +34,7 @@ using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
using Windows.Storage;
|
||||
using PCLStorage;
|
||||
//using PCLStorage;
|
||||
#endif
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
|
||||
@@ -432,12 +432,12 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
private static Stream OpenReadLocal(IOConnectionInfo ioc)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
if (ioc.StorageFile != null)
|
||||
{
|
||||
/*if (ioc.StorageFile != null)
|
||||
{*/
|
||||
return ioc.StorageFile.OpenAsync(FileAccessMode.Read).GetResults().AsStream();
|
||||
}
|
||||
/*}
|
||||
var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
|
||||
return file.OpenAsync(PCLStorage.FileAccess.Read).Result;
|
||||
return file.OpenAsync(PCLStorage.FileAccess.Read).Result;*/
|
||||
#else
|
||||
return new FileStream(ioc.Path, FileMode.Open, FileAccess.Read,
|
||||
FileShare.Read);
|
||||
@@ -478,12 +478,12 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
private static Stream OpenWriteLocal(IOConnectionInfo ioc)
|
||||
{
|
||||
#if ModernKeePassLibPCL
|
||||
if (ioc.StorageFile != null)
|
||||
{
|
||||
/*if (ioc.StorageFile != null)
|
||||
{*/
|
||||
return ioc.StorageFile.OpenAsync(FileAccessMode.ReadWrite).GetResults().AsStream();
|
||||
}
|
||||
/*}
|
||||
var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
|
||||
return file.OpenAsync(FileAccess.ReadAndWrite).Result;
|
||||
return file.OpenAsync(FileAccess.ReadAndWrite).Result;*/
|
||||
#else
|
||||
return new FileStream(ioc.Path, FileMode.Create, FileAccess.Write,
|
||||
FileShare.None);
|
||||
@@ -502,8 +502,9 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
RaiseIOAccessPreEvent(ioc, IOAccessType.Exists);
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
if(ioc.IsLocalFile())
|
||||
return (FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result != null);
|
||||
/*if(ioc.IsLocalFile())
|
||||
return (FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result != null);*/
|
||||
return ioc.StorageFile.IsAvailable;
|
||||
#else
|
||||
if(ioc.IsLocalFile()) return File.Exists(ioc.Path);
|
||||
#endif
|
||||
@@ -546,8 +547,8 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
#if ModernKeePassLibPCL
|
||||
if (!ioc.IsLocalFile()) return;
|
||||
ioc.StorageFile?.DeleteAsync().GetResults();
|
||||
var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
|
||||
file.DeleteAsync().RunSynchronously();
|
||||
/*var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
|
||||
file.DeleteAsync().RunSynchronously();*/
|
||||
#else
|
||||
if(ioc.IsLocalFile()) { File.Delete(ioc.Path); return; }
|
||||
#endif
|
||||
@@ -587,8 +588,8 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
#if ModernKeePassLibPCL
|
||||
if (!iocFrom.IsLocalFile()) return;
|
||||
iocFrom.StorageFile?.RenameAsync(iocTo.Path).GetResults();
|
||||
var file = FileSystem.Current.GetFileFromPathAsync(iocFrom.Path).Result;
|
||||
file.MoveAsync(iocTo.Path).RunSynchronously();
|
||||
/*var file = FileSystem.Current.GetFileFromPathAsync(iocFrom.Path).Result;
|
||||
file.MoveAsync(iocTo.Path).RunSynchronously();*/
|
||||
#else
|
||||
if(iocFrom.IsLocalFile()) { File.Move(iocFrom.Path, iocTo.Path); return; }
|
||||
#endif
|
||||
@@ -629,18 +630,18 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
}
|
||||
#endif
|
||||
|
||||
// using(Stream sIn = IOConnection.OpenRead(iocFrom))
|
||||
// {
|
||||
// using(Stream sOut = IOConnection.OpenWrite(iocTo))
|
||||
// {
|
||||
// MemUtil.CopyStream(sIn, sOut);
|
||||
// sOut.Close();
|
||||
// }
|
||||
//
|
||||
// sIn.Close();
|
||||
// }
|
||||
// DeleteFile(iocFrom);
|
||||
}
|
||||
// using(Stream sIn = IOConnection.OpenRead(iocFrom))
|
||||
// {
|
||||
// using(Stream sOut = IOConnection.OpenWrite(iocTo))
|
||||
// {
|
||||
// MemUtil.CopyStream(sIn, sOut);
|
||||
// sOut.Close();
|
||||
// }
|
||||
//
|
||||
// sIn.Close();
|
||||
// }
|
||||
// DeleteFile(iocFrom);
|
||||
}
|
||||
|
||||
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
|
||||
private static bool SendCommand(IOConnectionInfo ioc, string strMethod)
|
||||
@@ -656,8 +657,8 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
internal static void DisposeResponse(WebResponse wr, bool bGetStream)
|
||||
#if !ModernKeePassLibPCL
|
||||
internal static void DisposeResponse(WebResponse wr, bool bGetStream)
|
||||
{
|
||||
if(wr == null) return;
|
||||
|
||||
@@ -674,8 +675,8 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
try { wr.Dispose(); }
|
||||
catch(Exception) { Debug.Assert(false); }
|
||||
}
|
||||
|
||||
public static byte[] ReadFile(IOConnectionInfo ioc)
|
||||
#endif
|
||||
public static byte[] ReadFile(IOConnectionInfo ioc)
|
||||
{
|
||||
Stream sIn = null;
|
||||
MemoryStream ms = null;
|
||||
|
@@ -25,9 +25,9 @@ using System.Net;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
using System.Diagnostics;
|
||||
using Windows.Storage;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLStorage;
|
||||
using Windows.Storage;
|
||||
//using PCLStorage;
|
||||
#endif
|
||||
|
||||
using ModernKeePassLibPCL.Interfaces;
|
||||
|
@@ -24,7 +24,7 @@ using System.IO;
|
||||
using System.Diagnostics;
|
||||
using System.Security;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -42,6 +42,7 @@ using ModernKeePassLibPCL.Interfaces;
|
||||
using ModernKeePassLibPCL.Keys;
|
||||
using ModernKeePassLibPCL.Resources;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Serialization
|
||||
{
|
||||
@@ -221,13 +222,16 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
msHeader.Dispose();
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
m_pbHashOfHeader = sha256.HashData(pbHeader);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
m_pbHashOfHeader = sha256.HashData(pbHeader);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbHeader));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out m_pbHashOfHeader);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
m_pbHashOfHeader = sha256.ComputeHash(pbHeader);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private bool ReadHeaderField(BinaryReaderEx brSource)
|
||||
{
|
||||
@@ -348,14 +352,18 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
ms.Write(pKey32, 0, 32);
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var aesKey = sha256.HashData(ms.ToArray());
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var aesKey = sha256.HashData(ms.ToArray());*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(ms.ToArray()));
|
||||
byte[] aesKey;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out aesKey);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] aesKey = sha256.ComputeHash(ms.ToArray());
|
||||
#endif
|
||||
|
||||
ms.Dispose();
|
||||
ms.Dispose();
|
||||
Array.Clear(pKey32, 0, 32);
|
||||
|
||||
if((aesKey == null) || (aesKey.Length != 32))
|
||||
|
@@ -24,7 +24,7 @@ using System.IO;
|
||||
using System.Xml;
|
||||
using System.Security;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
@@ -47,6 +47,7 @@ using ModernKeePassLibPCL.Keys;
|
||||
using ModernKeePassLibPCL.Resources;
|
||||
using ModernKeePassLibPCL.Security;
|
||||
using ModernKeePassLibPCL.Utility;
|
||||
using Windows.Security.Cryptography.Core;
|
||||
|
||||
namespace ModernKeePassLibPCL.Serialization
|
||||
{
|
||||
@@ -189,14 +190,17 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
ms.Dispose();
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
m_pbHashOfHeader = sha256.HashData(pbHeader);
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
m_pbHashOfHeader = sha256.HashData(pbHeader);*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(pbHeader));
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out m_pbHashOfHeader);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
m_pbHashOfHeader = sha256.ComputeHash(pbHeader);
|
||||
#endif
|
||||
|
||||
s.Write(pbHeader, 0, pbHeader.Length);
|
||||
s.Write(pbHeader, 0, pbHeader.Length);
|
||||
s.Flush();
|
||||
}
|
||||
|
||||
@@ -236,14 +240,18 @@ namespace ModernKeePassLibPCL.Serialization
|
||||
ms.Write(pKey32, 0, 32);
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var aesKey = sha256.HashData(ms.ToArray());
|
||||
/*var sha256 = WinRTCrypto.HashAlgorithmProvider.OpenAlgorithm(HashAlgorithm.Sha256);
|
||||
var aesKey = sha256.HashData(ms.ToArray());*/
|
||||
var sha256 = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Sha256);
|
||||
var buffer = sha256.HashData(CryptographicBuffer.CreateFromByteArray(ms.ToArray()));
|
||||
byte[] aesKey;
|
||||
CryptographicBuffer.CopyToByteArray(buffer, out aesKey);
|
||||
#else
|
||||
SHA256Managed sha256 = new SHA256Managed();
|
||||
byte[] aesKey = sha256.ComputeHash(ms.ToArray());
|
||||
#endif
|
||||
|
||||
ms.Dispose();
|
||||
|
||||
ms.Dispose();
|
||||
Array.Clear(pKey32, 0, 32);
|
||||
|
||||
Debug.Assert(CipherPool.GlobalPool != null);
|
||||
|
@@ -30,7 +30,8 @@ using System.IO.Compression;
|
||||
#endif
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLStorage;
|
||||
//using PCLStorage;
|
||||
using Windows.Storage;
|
||||
#endif
|
||||
|
||||
using ModernKeePassLibPCL.Collections;
|
||||
|
@@ -25,7 +25,7 @@ using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLCrypto;
|
||||
using Windows.Security.Cryptography;
|
||||
#else
|
||||
using System.Security.Cryptography;
|
||||
#endif
|
||||
|
@@ -25,7 +25,8 @@ using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
#if ModernKeePassLibPCL
|
||||
using PCLStorage;
|
||||
//using PCLStorage;
|
||||
using Windows.Storage;
|
||||
#endif
|
||||
|
||||
using ModernKeePassLibPCL.Native;
|
||||
@@ -50,11 +51,12 @@ namespace ModernKeePassLibPCL.Utility
|
||||
#if KeePassRT
|
||||
get { return '\\'; }
|
||||
#elif ModernKeePassLibPCL
|
||||
get { return PortablePath.DirectorySeparatorChar; }
|
||||
//get { return PortablePath.DirectorySeparatorChar; }
|
||||
get { return '\\'; }
|
||||
#else
|
||||
get { return Path.DirectorySeparatorChar; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the directory (path) of a file name. The returned string may be
|
||||
@@ -457,8 +459,11 @@ namespace ModernKeePassLibPCL.Utility
|
||||
strPath).AwaitEx();
|
||||
str = dirT.Path;
|
||||
#elif ModernKeePassLibPCL
|
||||
var dirT = FileSystem.Current.GetFolderFromPathAsync(strPath).Result;
|
||||
str = dirT.Path;
|
||||
var dirT = StorageFolder.GetFolderFromPathAsync(
|
||||
strPath).GetResults();
|
||||
str = dirT.Path;
|
||||
/*var dirT = FileSystem.Current.GetFolderFromPathAsync(strPath).Result;
|
||||
str = dirT.Path;*/
|
||||
#else
|
||||
str = Path.GetFullPath(strPath);
|
||||
#endif
|
||||
|
@@ -1,11 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Xml.XmlSerializer" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.InteropServices.WindowsRuntime" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Linq" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Encoding.Extensions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.Serialization.Primitives" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.InteropServices" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Resources.ResourceManager" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.Tracing" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Primitives" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ObjectModel" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Compression" publicKeyToken="B77A5C561934E089" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Encoding" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Linq.Expressions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Concurrent" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.RegularExpressions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Timer" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.Extensions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Xml.ReaderWriter" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Globalization" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.Debug" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Primitives" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Reflection.Extensions" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Diagnostics.Tools" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Xml.XDocument" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.Numerics" publicKeyToken="B03F5F7F11D50A3A" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Validation" publicKeyToken="2fc06f0d701809a7" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0" />
|
||||
<assemblyIdentity name="Validation" publicKeyToken="2fc06f0d701809a7" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.4.0.0" newVersion="2.4.0.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8+wp8" />
|
||||
<package id="Microsoft.Bcl.Compression" version="3.9.85" targetFramework="portable46-net451+win81+wpa81" />
|
||||
<package id="PCLCrypto" version="2.0.147" targetFramework="portable45-net45+win8+wp8" />
|
||||
<package id="PCLStorage" version="1.0.2" targetFramework="portable-net45+win+wp80" />
|
||||
<package id="PInvoke.BCrypt" version="0.5.97" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="PInvoke.Kernel32" version="0.5.97" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="PInvoke.NCrypt" version="0.5.97" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="PInvoke.Windows.Core" version="0.5.97" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Splat" version="2.0.0" targetFramework="portable45-net45+win8+wpa81" />
|
||||
<package id="Validation" version="2.4.15" targetFramework="portable45-net45+win8+wp8" />
|
||||
</packages>
|
17
ModernKeePassLib/project.json
Normal file
17
ModernKeePassLib/project.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"supports": {},
|
||||
"dependencies": {
|
||||
"Microsoft.Bcl.Build": "1.0.21",
|
||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
|
||||
"NETStandard.Library": "1.6.0",
|
||||
"PInvoke.Windows.Core": "0.5.97",
|
||||
"Splat": "2.0.0",
|
||||
"System.Runtime.Extensions": "4.3.0",
|
||||
"System.Xml.ReaderWriter": "4.3.0",
|
||||
"System.Xml.XmlSerializer": "4.3.0",
|
||||
"Validation": "2.4.15"
|
||||
},
|
||||
"frameworks": {
|
||||
"netstandard1.2": {}
|
||||
}
|
||||
}
|
2869
ModernKeePassLib/project.lock.json
Normal file
2869
ModernKeePassLib/project.lock.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user