Read-mode working

Write-mode does not create exceptions but still doesn't work
This commit is contained in:
2017-09-25 14:50:47 +02:00
parent 3bf8015280
commit 34996da19d
38 changed files with 341 additions and 358 deletions

View File

@@ -159,8 +159,12 @@
</Page>
</ItemGroup>
<ItemGroup>
<Reference Include="ModernKeePassLibPCL, Version=2.28.1.32210, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModernKeePassLibPCL.2.28.1.32210\lib\netstandard1.2\ModernKeePassLibPCL.dll</HintPath>
<Reference Include="crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.1.1\lib\netstandard1.0\crypto.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ModernKeePassLibPCL, Version=2.28.1.22258, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModernKeePassLibPCL.2.28.1.22258\lib\netstandard1.2\ModernKeePassLibPCL.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="PCLCrypto, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d4421c8a4786956c, processorArchitecture=MSIL">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.1.0.6" />
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.1.0.7" />
<Properties>
<DisplayName>ModernKeePass</DisplayName>
<PublisherDisplayName>wismna</PublisherDisplayName>

View File

@@ -4,7 +4,7 @@
<package id="Microsoft.Bcl.Compression" version="3.9.85" targetFramework="win81" />
<package id="Microsoft.NETCore.Platforms" version="2.0.0" targetFramework="win81" />
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
<package id="ModernKeePassLibPCL" version="2.28.1.32210" targetFramework="win81" />
<package id="ModernKeePassLibPCL" version="2.28.1.22258" targetFramework="win81" />
<package id="NETStandard.Library" version="2.0.0" targetFramework="win81" />
<package id="PCLCrypto" version="2.0.147" targetFramework="win81" />
<package id="PCLStorage" version="1.0.2" targetFramework="win81" />
@@ -12,11 +12,23 @@
<package id="PInvoke.Kernel32" version="0.5.97" targetFramework="win81" />
<package id="PInvoke.NCrypt" version="0.5.97" targetFramework="win81" />
<package id="PInvoke.Windows.Core" version="0.5.97" targetFramework="win81" />
<package id="Portable.BouncyCastle" version="1.8.1.1" targetFramework="win81" />
<package id="Splat" version="2.0.0" targetFramework="win81" />
<package id="System.Collections" version="4.0.11" targetFramework="win81" />
<package id="System.Diagnostics.Debug" version="4.0.11" targetFramework="win81" />
<package id="System.Globalization" version="4.0.11" targetFramework="win81" />
<package id="System.IO" version="4.1.0" targetFramework="win81" />
<package id="System.Linq" version="4.1.0" targetFramework="win81" />
<package id="System.Net.Requests" version="4.3.0" targetFramework="win81" />
<package id="System.Reflection" version="4.1.0" targetFramework="win81" />
<package id="System.Reflection.Extensions" version="4.0.1" targetFramework="win81" />
<package id="System.Runtime" version="4.1.0" targetFramework="win81" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="win81" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="win81" />
<package id="System.Runtime.WindowsRuntime" version="4.3.0" targetFramework="win81" />
<package id="System.Text.Encoding" version="4.0.11" targetFramework="win81" />
<package id="System.Threading" version="4.0.11" targetFramework="win81" />
<package id="System.Threading.Tasks" version="4.0.11" targetFramework="win81" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="win81" />
<package id="System.Xml.XmlSerializer" version="4.3.0" targetFramework="win81" />
<package id="Validation" version="2.4.15" targetFramework="win81" />

View File

@@ -23,7 +23,7 @@ using System.Text;
using System.IO;
using System.Security;
using System.Diagnostics;
using Windows.Storage.Streams;
#if ModernKeePassLibPCL
using Windows.Security.Cryptography;
using Windows.Security.Cryptography.Core;
@@ -116,7 +116,7 @@ namespace ModernKeePassLibPCL.Cryptography.Cipher
private static Stream CreateStream(Stream s, bool bEncrypt, byte[] pbKey, byte[] pbIV)
{
StandardAesEngine.ValidateArguments(s, bEncrypt, pbKey, pbIV);
ValidateArguments(s, bEncrypt, pbKey, pbIV);
byte[] pbLocalIV = new byte[16];
Array.Copy(pbIV, pbLocalIV, 16);
@@ -201,12 +201,12 @@ namespace ModernKeePassLibPCL.Cryptography.Cipher
public Stream EncryptStream(Stream sPlainText, byte[] pbKey, byte[] pbIV)
{
return StandardAesEngine.CreateStream(sPlainText, true, pbKey, pbIV);
return CreateStream(sPlainText, true, pbKey, pbIV);
}
public Stream DecryptStream(Stream sEncrypted, byte[] pbKey, byte[] pbIV)
{
return StandardAesEngine.CreateStream(sEncrypted, false, pbKey, pbIV);
return CreateStream(sEncrypted, false, pbKey, pbIV);
}
}
}

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Text;
using System.Threading.Tasks;
using Windows.Security.Cryptography.Core;
namespace ModernKeePassLibPCL.Cryptography
{
public static class CryptographicHashExtensions
{
public static int TransformBlock(this CryptographicHash hash, byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
{
byte[] buffer;
if (inputCount < inputBuffer.Length)
{
buffer = new byte[inputCount];
Array.Copy(inputBuffer, inputOffset, buffer, 0, inputCount);
}
else
{
buffer = inputBuffer;
}
hash.Append(buffer.AsBuffer());
if (outputBuffer != null)
{
Array.Copy(inputBuffer, inputOffset, outputBuffer, outputOffset, inputCount);
}
return inputCount;
}
public static byte[] TransformFinalBlock(this CryptographicHash hash, byte[] inputBuffer, int inputOffset, int inputCount)
{
hash.TransformBlock(inputBuffer, inputOffset, inputCount, null, 0);
if (inputCount == inputBuffer.Length)
{
return inputBuffer;
}
else
{
var buffer = new byte[inputCount];
Array.Copy(inputBuffer, inputOffset, buffer, 0, inputCount);
return buffer;
}
}
}
}

View File

@@ -53,7 +53,7 @@ namespace ModernKeePassLibPCL.Cryptography
public override bool CanRead
{
get { return !m_bWriting; }
get { return /*!m_bWriting;*/true; }
}
public override bool CanSeek
@@ -160,7 +160,7 @@ namespace ModernKeePassLibPCL.Cryptography
public override int Read(byte[] pbBuffer, int nOffset, int nCount)
{
if(m_bWriting) throw new InvalidOperationException();
//if(m_bWriting) throw new InvalidOperationException();
int nRead = m_sBaseStream.Read(pbBuffer, nOffset, nCount);
int nPartialRead = nRead;

View File

@@ -22,6 +22,7 @@ using System.Text;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.InteropServices.WindowsRuntime;
#if ModernKeePassLibPCL
using Windows.Security.Cryptography;
#else
@@ -39,6 +40,8 @@ using ModernKeePassLibPCL.Security;
using ModernKeePassLibPCL.Utility;
using Windows.Security.Cryptography.Core;
using Windows.Storage.Streams;
using Org.BouncyCastle.Crypto.Engines;
using Org.BouncyCastle.Crypto.Parameters;
namespace ModernKeePassLibPCL.Keys
{
@@ -286,7 +289,7 @@ namespace ModernKeePassLibPCL.Keys
return (new SHA256Managed()).ComputeHash(pbNewKey);
#endif
if(TransformKeyManaged(pbNewKey, pbKeySeed32, uNumRounds) == false)
if(TransformKeyManaged(ref pbNewKey, pbKeySeed32, uNumRounds) == false)
return null;
#if ModernKeePassLibPCL
@@ -303,7 +306,7 @@ namespace ModernKeePassLibPCL.Keys
#endif
}
public static bool TransformKeyManaged(byte[] pbNewKey32, byte[] pbKeySeed32,
public static bool TransformKeyManaged(ref byte[] pbNewKey32, byte[] pbKeySeed32,
ulong uNumRounds)
{
#if KeePassRT
@@ -321,11 +324,20 @@ namespace ModernKeePassLibPCL.Keys
/*var aes = WinRTCrypto.SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithm.AesEcb);
var key = aes.CreateSymmetricKey(pbKeySeed32);
var iCrypt = WinRTCrypto.CryptographicEngine.CreateEncryptor(key);*/
var aes = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesEcb);
/*var aes = SymmetricKeyAlgorithmProvider.OpenAlgorithm(SymmetricAlgorithmNames.AesEcb);
var key = aes.CreateSymmetricKey(CryptographicBuffer.CreateFromByteArray(pbKeySeed32));
var parameters = KeyDerivationParameters.BuildForPbkdf2(CryptographicBuffer.CreateFromByteArray(pbKeySeed32), (uint)uNumRounds);
var result = CryptographicEngine.DeriveKeyMaterial(key, parameters, 32);
CryptographicBuffer.CopyToByteArray(result, out pbNewKey32);
CryptographicBuffer.CopyToByteArray(result, out pbNewKey32);*/
KeyParameter kp = new KeyParameter(pbKeySeed32);
AesEngine aes = new AesEngine();
aes.Init(true, kp);
for (ulong i = 0; i < uNumRounds; ++i)
{
aes.ProcessBlock(pbNewKey32, 0, pbNewKey32, 0);
aes.ProcessBlock(pbNewKey32, 16, pbNewKey32, 16);
}
#else
byte[] pbIV = new byte[16];
@@ -362,7 +374,7 @@ namespace ModernKeePassLibPCL.Keys
}*/
#endif
return true;
return true;
}
/// <summary>

View File

@@ -318,11 +318,11 @@ namespace ModernKeePassLibPCL.Keys
if(pbKeyData == null) throw new ArgumentNullException("pbKeyData");
IOConnectionInfo ioc = IOConnectionInfo.FromPath(strFile);
Stream sOut = await IOConnection.OpenWrite(ioc);
var sOut = await IOConnection.OpenWrite(ioc);
#if ModernKeePassLibPCL
var settings = new XmlWriterSettings() { Encoding = StrUtil.Utf8 };
var xtw = XmlWriter.Create(sOut, settings);
var xtw = XmlWriter.Create(sOut.AsStream(), settings);
#else
XmlTextWriter xtw = new XmlTextWriter(sOut, StrUtil.Utf8);
#endif

View File

@@ -49,6 +49,7 @@
<Compile Include="Cryptography\Cipher\CipherPool.cs" />
<Compile Include="Cryptography\Cipher\Salsa20Cipher.cs" />
<Compile Include="Cryptography\Cipher\StandardAesEngine.cs" />
<Compile Include="Cryptography\CryptographicHashExtensions.cs" />
<Compile Include="Cryptography\CryptoRandom.cs" />
<Compile Include="Cryptography\CryptoRandomStream.cs" />
<Compile Include="Cryptography\Cipher\ICipherEngine.cs" />

View File

@@ -25,8 +25,8 @@
</metadata>
<!-- DLLs and resources -->
<files>
<!--<file src="bin\Release\ModernKeePassLib.dll" target="lib\netstandard1.2"/>
<file src="bin\ARM\Release\ModernKeePassLib.dll" target="lib\ARM\netstandard1.2"/>
<file src="bin\Release\ModernKeePassLib.dll" target="lib\netstandard1.2"/>
<!--<file src="bin\ARM\Release\ModernKeePassLib.dll" target="lib\ARM\netstandard1.2"/>
<file src="bin\x64\Release\ModernKeePassLib.dll" target="lib\x64\netstandard1.2"/>
<file src="bin\x86\Release\ModernKeePassLib.dll" target="lib\x86\netstandard1.2"/>-->
</files>

View File

@@ -589,7 +589,7 @@ namespace ModernKeePassLibPCL
KdbxFile kdbx = new KdbxFile(this);
kdbx.DetachBinaries = m_strDetachBins;
Stream s = await IOConnection.OpenRead(ioSource);
var s = await IOConnection.OpenRead(ioSource);
kdbx.Load(s, KdbxFormat.Default, slLogger);
s.Dispose();
@@ -622,7 +622,7 @@ namespace ModernKeePassLibPCL
{
FileTransactionEx ft = new FileTransactionEx(m_ioSource,
m_bUseFileTransactions);
Stream s = await ft.OpenWrite();
var s = await ft.OpenWrite();
KdbxFile kdb = new KdbxFile(this);
kdb.Save(s, null, KdbxFormat.Default, slLogger);

View File

@@ -27,7 +27,8 @@ using System.Threading.Tasks;
using System.Threading;
#endif
using System.Diagnostics;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Storage.Streams;
using ModernKeePassLibPCL.Cryptography;
using ModernKeePassLibPCL.Resources;
using ModernKeePassLibPCL.Utility;
@@ -124,26 +125,34 @@ namespace ModernKeePassLibPCL.Serialization
public static async Task<LockFileInfo> Load(IOConnectionInfo iocLockFile)
{
Stream s = null;
using (var s = await IOConnection.OpenRead(iocLockFile))
try
{
s = await IOConnection.OpenRead(iocLockFile);
if(s == null) return null;
StreamReader sr = new StreamReader(s, StrUtil.Utf8);
string str = sr.ReadToEnd();
sr.Dispose();
if(str == null) { Debug.Assert(false); return null; }
using (var sr = new StreamReader(s.AsStream(), StrUtil.Utf8))
{
string str = sr.ReadToEnd();
if (str == null)
{
Debug.Assert(false);
}
str = StrUtil.NormalizeNewLines(str, false);
string[] v = str.Split('\n');
if((v == null) || (v.Length < 6)) { Debug.Assert(false); return null; }
str = StrUtil.NormalizeNewLines(str, false);
string[] v = str.Split('\n');
if ((v == null) || (v.Length < 6))
{
Debug.Assert(false);
}
if(!v[0].StartsWith(LockFileHeader)) { Debug.Assert(false); return null; }
return new LockFileInfo(v[1], v[2], v[3], v[4], v[5]);
if (!v[0].StartsWith(LockFileHeader))
{
Debug.Assert(false);
}
return new LockFileInfo(v[1], v[2], v[3], v[4], v[5]);
}
}
catch(FileNotFoundException) { }
catch(Exception) { Debug.Assert(false); }
finally { if(s != null) s.Dispose(); }
return null;
}
@@ -151,46 +160,27 @@ namespace ModernKeePassLibPCL.Serialization
// Throws on error
public static async Task<LockFileInfo> Create(IOConnectionInfo iocLockFile)
{
LockFileInfo lfi;
Stream s = null;
try
byte[] pbID = CryptoRandom.Instance.GetRandomBytes(16);
string strTime = TimeUtil.SerializeUtc(DateTime.Now);
var lfi = new LockFileInfo(Convert.ToBase64String(pbID), strTime,
string.Empty, string.Empty, string.Empty);
StringBuilder sb = new StringBuilder();
sb.AppendLine(LockFileHeader);
sb.AppendLine(lfi.ID);
sb.AppendLine(strTime);
sb.AppendLine(lfi.UserName);
sb.AppendLine(lfi.Machine);
sb.AppendLine(lfi.Domain);
using (var s = await IOConnection.OpenWrite(iocLockFile))
{
byte[] pbID = CryptoRandom.Instance.GetRandomBytes(16);
string strTime = TimeUtil.SerializeUtc(DateTime.Now);
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
lfi = new LockFileInfo(Convert.ToBase64String(pbID), strTime,
Environment.UserName, Environment.MachineName,
Environment.UserDomainName);
#else
lfi = new LockFileInfo(Convert.ToBase64String(pbID), strTime,
string.Empty, string.Empty, string.Empty);
#endif
StringBuilder sb = new StringBuilder();
#if !KeePassLibSD
sb.AppendLine(LockFileHeader);
sb.AppendLine(lfi.ID);
sb.AppendLine(strTime);
sb.AppendLine(lfi.UserName);
sb.AppendLine(lfi.Machine);
sb.AppendLine(lfi.Domain);
#else
sb.Append(LockFileHeader + MessageService.NewLine);
sb.Append(lfi.ID + MessageService.NewLine);
sb.Append(strTime + MessageService.NewLine);
sb.Append(lfi.UserName + MessageService.NewLine);
sb.Append(lfi.Machine + MessageService.NewLine);
sb.Append(lfi.Domain + MessageService.NewLine);
#endif
byte[] pbFile = StrUtil.Utf8.GetBytes(sb.ToString());
s = await IOConnection.OpenWrite(iocLockFile);
if(s == null) throw new IOException(iocLockFile.GetDisplayName());
s.Write(pbFile, 0, pbFile.Length);
if (s == null) throw new IOException(iocLockFile.GetDisplayName());
await s.WriteAsync(pbFile.AsBuffer());
}
finally { if(s != null) s.Dispose(); }
return lfi;
}

View File

@@ -30,6 +30,7 @@ using System.Security.AccessControl;
using ModernKeePassLibPCL.Native;
using ModernKeePassLibPCL.Utility;
using System.Threading.Tasks;
using Windows.Storage.Streams;
namespace ModernKeePassLibPCL.Serialization
{
@@ -78,7 +79,7 @@ namespace ModernKeePassLibPCL.Serialization
else m_iocTemp = m_iocBase;
}
public async Task<Stream> OpenWrite()
public async Task<IRandomAccessStream> OpenWrite()
{
if(!m_bTransacted) m_bMadeUnhidden = UrlUtil.UnhideFile(m_iocTemp.Path);
else // m_bTransacted
@@ -108,7 +109,7 @@ namespace ModernKeePassLibPCL.Serialization
bool bEfsEncrypted = false;
#endif
if(await IOConnection.FileExists(m_iocBase))
if(IOConnection.FileExists(m_iocBase))
{
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
if(m_iocBase.IsLocalFile())

View File

@@ -422,7 +422,7 @@ namespace ModernKeePassLibPCL.Serialization
new Uri(ioc.Path)));
}
#else
public static async Task<Stream> OpenRead(IOConnectionInfo ioc)
public static async Task<IRandomAccessStream> OpenRead(IOConnectionInfo ioc)
{
RaiseIOAccessPreEvent(ioc, IOAccessType.Read);
@@ -430,20 +430,9 @@ namespace ModernKeePassLibPCL.Serialization
}
#endif
private static async Task<Stream> OpenReadLocal(IOConnectionInfo ioc)
private static async Task<IRandomAccessStream> OpenReadLocal(IOConnectionInfo ioc)
{
#if ModernKeePassLibPCL
/*if (ioc.StorageFile != null)
{*/
var file = await ioc.StorageFile.OpenAsync(FileAccessMode.Read);
return file.AsStream();
/*}
var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
return file.OpenAsync(PCLStorage.FileAccess.Read).Result;*/
#else
return new FileStream(ioc.Path, FileMode.Open, FileAccess.Read,
FileShare.Read);
#endif
return await ioc.StorageFile.OpenAsync(FileAccessMode.Read);
}
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
@@ -469,7 +458,7 @@ namespace ModernKeePassLibPCL.Serialization
return IocStream.WrapIfRequired(s);
}
#else
public static async Task<Stream> OpenWrite(IOConnectionInfo ioc)
public static async Task<IRandomAccessStream> OpenWrite(IOConnectionInfo ioc)
{
RaiseIOAccessPreEvent(ioc, IOAccessType.Write);
@@ -477,102 +466,32 @@ namespace ModernKeePassLibPCL.Serialization
}
#endif
private static async Task<Stream> OpenWriteLocal(IOConnectionInfo ioc)
private static async Task<IRandomAccessStream> OpenWriteLocal(IOConnectionInfo ioc)
{
#if ModernKeePassLibPCL
/*if (ioc.StorageFile != null)
{*/
var file = await ioc.StorageFile.OpenAsync(FileAccessMode.ReadWrite);
return file.AsStream();
/*}
var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
return file.OpenAsync(FileAccess.ReadAndWrite).Result;*/
#else
return new FileStream(ioc.Path, FileMode.Create, FileAccess.Write,
FileShare.None);
#endif
return await ioc.StorageFile.OpenAsync(FileAccessMode.ReadWrite);
}
public static async Task<bool> FileExists(IOConnectionInfo ioc)
public static bool FileExists(IOConnectionInfo ioc)
{
return await FileExists(ioc, false);
return FileExists(ioc, false);
}
public static async Task<bool> FileExists(IOConnectionInfo ioc, bool bThrowErrors)
public static bool FileExists(IOConnectionInfo ioc, bool bThrowErrors)
{
if(ioc == null) { Debug.Assert(false); return false; }
if(ioc == null) { Debug.Assert(false);
}
RaiseIOAccessPreEvent(ioc, IOAccessType.Exists);
#if ModernKeePassLibPCL
/*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
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
if(ioc.Path.StartsWith("ftp://", StrUtil.CaseIgnoreCmp))
{
bool b = SendCommand(ioc, WebRequestMethods.Ftp.GetDateTimestamp);
if(!b && bThrowErrors) throw new InvalidOperationException();
return b;
}
#endif
try
{
Stream s = await OpenRead(ioc);
if(s == null) throw new FileNotFoundException();
try { s.ReadByte(); }
catch(Exception) { }
// We didn't download the file completely; close may throw
// an exception -- that's okay
try { s.Dispose(); }
catch(Exception) { }
}
catch(Exception)
{
if(bThrowErrors) throw;
return false;
}
return true;
}
public static async void DeleteFile(IOConnectionInfo ioc)
{
RaiseIOAccessPreEvent(ioc, IOAccessType.Delete);
#if ModernKeePassLibPCL
if (!ioc.IsLocalFile()) return;
await ioc.StorageFile?.DeleteAsync();
/*var file = FileSystem.Current.GetFileFromPathAsync(ioc.Path).Result;
file.DeleteAsync().RunSynchronously();*/
#else
if(ioc.IsLocalFile()) { File.Delete(ioc.Path); return; }
#endif
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
WebRequest req = CreateWebRequest(ioc);
if(req != null)
{
if(req is HttpWebRequest) req.Method = "DELETE";
else if(req is FtpWebRequest)
req.Method = WebRequestMethods.Ftp.DeleteFile;
else if(req is FileWebRequest)
{
File.Delete(UrlUtil.FileUrlToPath(ioc.Path));
return;
}
else req.Method = WrmDeleteFile;
DisposeResponse(req.GetResponse(), true);
}
#endif
}
/// <summary>
@@ -588,62 +507,8 @@ namespace ModernKeePassLibPCL.Serialization
{
RaiseIOAccessPreEvent(iocFrom, iocTo, IOAccessType.Move);
#if ModernKeePassLibPCL
if (!iocFrom.IsLocalFile()) return;
await iocFrom.StorageFile?.RenameAsync(iocTo.Path);
/*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
#if (!ModernKeePassLibPCL && !KeePassLibSD && !KeePassRT)
WebRequest req = CreateWebRequest(iocFrom);
if(req != null)
{
if(req is HttpWebRequest)
{
req.Method = "MOVE";
req.Headers.Set("Destination", iocTo.Path); // Full URL supported
}
else if(req is FtpWebRequest)
{
req.Method = WebRequestMethods.Ftp.Rename;
string strTo = UrlUtil.GetFileName(iocTo.Path);
// We're affected by .NET bug 621450:
// https://connect.microsoft.com/VisualStudio/feedback/details/621450/problem-renaming-file-on-ftp-server-using-ftpwebrequest-in-net-framework-4-0-vs2010-only
// Prepending "./", "%2E/" or "Dummy/../" doesn't work.
((FtpWebRequest)req).RenameTo = strTo;
}
else if(req is FileWebRequest)
{
File.Move(UrlUtil.FileUrlToPath(iocFrom.Path),
UrlUtil.FileUrlToPath(iocTo.Path));
return;
}
else
{
req.Method = WrmMoveFile;
req.Headers.Set(WrhMoveFileTo, iocTo.Path);
}
DisposeResponse(req.GetResponse(), true);
}
#endif
// 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)
@@ -681,7 +546,7 @@ namespace ModernKeePassLibPCL.Serialization
#endif
public static async Task<byte[]> ReadFile(IOConnectionInfo ioc)
{
Stream sIn = null;
IRandomAccessStream sIn = null;
MemoryStream ms = null;
try
{
@@ -689,7 +554,8 @@ namespace ModernKeePassLibPCL.Serialization
if(sIn == null) return null;
ms = new MemoryStream();
MemUtil.CopyStream(sIn, ms);
MemUtil.CopyStream(sIn.AsStream(), ms);
return ms.ToArray();
}

View File

@@ -43,6 +43,7 @@ using ModernKeePassLibPCL.Keys;
using ModernKeePassLibPCL.Resources;
using ModernKeePassLibPCL.Utility;
using Windows.Security.Cryptography.Core;
using Windows.Storage.Streams;
namespace ModernKeePassLibPCL.Serialization
{
@@ -70,7 +71,7 @@ namespace ModernKeePassLibPCL.Serialization
/// a KDBX stream.</param>
/// <param name="kdbFormat">Format specifier.</param>
/// <param name="slLogger">Status logger (optional).</param>
public void Load(Stream sSource, KdbxFormat kdbFormat, IStatusLogger slLogger)
public void Load(IRandomAccessStream sSource, KdbxFormat kdbFormat, IStatusLogger slLogger)
{
Debug.Assert(sSource != null);
if(sSource == null) throw new ArgumentNullException("sSource");
@@ -78,7 +79,7 @@ namespace ModernKeePassLibPCL.Serialization
m_format = kdbFormat;
m_slLogger = slLogger;
HashingStreamEx hashedStream = new HashingStreamEx(sSource, false, null);
HashingStreamEx hashedStream = new HashingStreamEx(sSource.AsStream(), false, null);
UTF8Encoding encNoBom = StrUtil.Utf8;
try
@@ -164,7 +165,7 @@ namespace ModernKeePassLibPCL.Serialization
finally { CommonCleanUpRead(sSource, hashedStream); }
}
private void CommonCleanUpRead(Stream sSource, HashingStreamEx hashedStream)
private void CommonCleanUpRead(IRandomAccessStream sSource, HashingStreamEx hashedStream)
{
hashedStream.Dispose();
m_pbHashOfFileOnDisk = hashedStream.Hash;
@@ -375,7 +376,7 @@ namespace ModernKeePassLibPCL.Serialization
}
[Obsolete]
public static List<PwEntry> ReadEntries(PwDatabase pwDatabase, Stream msData)
public static List<PwEntry> ReadEntries(PwDatabase pwDatabase, IRandomAccessStream msData)
{
return ReadEntries(msData);
}
@@ -385,7 +386,7 @@ namespace ModernKeePassLibPCL.Serialization
/// </summary>
/// <param name="msData">Input stream to read the entries from.</param>
/// <returns>Extracted entries.</returns>
public static List<PwEntry> ReadEntries(Stream msData)
public static List<PwEntry> ReadEntries(IRandomAccessStream msData)
{
/* KdbxFile f = new KdbxFile(pwDatabase);
f.m_format = KdbxFormat.PlainXml;

View File

@@ -48,6 +48,7 @@ using ModernKeePassLibPCL.Resources;
using ModernKeePassLibPCL.Security;
using ModernKeePassLibPCL.Utility;
using Windows.Security.Cryptography.Core;
using Windows.Storage.Streams;
namespace ModernKeePassLibPCL.Serialization
{
@@ -76,7 +77,7 @@ namespace ModernKeePassLibPCL.Serialization
/// be written.</param>
/// <param name="format">Format of the file to create.</param>
/// <param name="slLogger">Logger that recieves status information.</param>
public void Save(Stream sSaveTo, PwGroup pgDataSource, KdbxFormat format,
public void Save(IRandomAccessStream sSaveTo, PwGroup pgDataSource, KdbxFormat format,
IStatusLogger slLogger)
{
Debug.Assert(sSaveTo != null);
@@ -85,7 +86,7 @@ namespace ModernKeePassLibPCL.Serialization
m_format = format;
m_slLogger = slLogger;
HashingStreamEx hashedStream = new HashingStreamEx(sSaveTo, true, null);
HashingStreamEx hashedStream = new HashingStreamEx(sSaveTo.AsStream(), true, null);
UTF8Encoding encNoBom = StrUtil.Utf8;
CryptoRandom cr = CryptoRandom.Instance;
@@ -145,7 +146,7 @@ namespace ModernKeePassLibPCL.Serialization
finally { CommonCleanUpWrite(sSaveTo, hashedStream); }
}
private void CommonCleanUpWrite(Stream sSaveTo, HashingStreamEx hashedStream)
private void CommonCleanUpWrite(IRandomAccessStream sSaveTo, HashingStreamEx hashedStream)
{
hashedStream.Dispose();
m_pbHashOfFileOnDisk = hashedStream.Hash;
@@ -158,50 +159,53 @@ namespace ModernKeePassLibPCL.Serialization
private void WriteHeader(Stream s)
{
MemoryStream ms = new MemoryStream();
using (var ms = new MemoryStream())
{
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileSignature1));
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileSignature2));
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileVersion32));
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileSignature1));
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileSignature2));
MemUtil.Write(ms, MemUtil.UInt32ToBytes(FileVersion32));
WriteHeaderField(ms, KdbxHeaderFieldID.CipherID,
m_pwDatabase.DataCipherUuid.UuidBytes);
WriteHeaderField(ms, KdbxHeaderFieldID.CipherID,
m_pwDatabase.DataCipherUuid.UuidBytes);
int nCprID = (int)m_pwDatabase.Compression;
WriteHeaderField(ms, KdbxHeaderFieldID.CompressionFlags,
MemUtil.UInt32ToBytes((uint)nCprID));
int nCprID = (int) m_pwDatabase.Compression;
WriteHeaderField(ms, KdbxHeaderFieldID.CompressionFlags,
MemUtil.UInt32ToBytes((uint) nCprID));
WriteHeaderField(ms, KdbxHeaderFieldID.MasterSeed, m_pbMasterSeed);
WriteHeaderField(ms, KdbxHeaderFieldID.TransformSeed, m_pbTransformSeed);
WriteHeaderField(ms, KdbxHeaderFieldID.TransformRounds,
MemUtil.UInt64ToBytes(m_pwDatabase.KeyEncryptionRounds));
WriteHeaderField(ms, KdbxHeaderFieldID.EncryptionIV, m_pbEncryptionIV);
WriteHeaderField(ms, KdbxHeaderFieldID.ProtectedStreamKey, m_pbProtectedStreamKey);
WriteHeaderField(ms, KdbxHeaderFieldID.StreamStartBytes, m_pbStreamStartBytes);
WriteHeaderField(ms, KdbxHeaderFieldID.MasterSeed, m_pbMasterSeed);
WriteHeaderField(ms, KdbxHeaderFieldID.TransformSeed, m_pbTransformSeed);
WriteHeaderField(ms, KdbxHeaderFieldID.TransformRounds,
MemUtil.UInt64ToBytes(m_pwDatabase.KeyEncryptionRounds));
WriteHeaderField(ms, KdbxHeaderFieldID.EncryptionIV, m_pbEncryptionIV);
WriteHeaderField(ms, KdbxHeaderFieldID.ProtectedStreamKey, m_pbProtectedStreamKey);
WriteHeaderField(ms, KdbxHeaderFieldID.StreamStartBytes, m_pbStreamStartBytes);
int nIrsID = (int)m_craInnerRandomStream;
WriteHeaderField(ms, KdbxHeaderFieldID.InnerRandomStreamID,
MemUtil.UInt32ToBytes((uint)nIrsID));
int nIrsID = (int) m_craInnerRandomStream;
WriteHeaderField(ms, KdbxHeaderFieldID.InnerRandomStreamID,
MemUtil.UInt32ToBytes((uint) nIrsID));
WriteHeaderField(ms, KdbxHeaderFieldID.EndOfHeader, new byte[]{
(byte)'\r', (byte)'\n', (byte)'\r', (byte)'\n' });
WriteHeaderField(ms, KdbxHeaderFieldID.EndOfHeader, new byte[]
{
(byte) '\r', (byte) '\n', (byte) '\r', (byte) '\n'
});
byte[] pbHeader = ms.ToArray();
ms.Dispose();
byte[] pbHeader = ms.ToArray();
#if ModernKeePassLibPCL
/*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);
/*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.Flush();
s.Write(pbHeader, 0, pbHeader.Length);
s.Flush();
}
}
private static void WriteHeaderField(Stream s, KdbxHeaderFieldID kdbID,
@@ -221,43 +225,42 @@ namespace ModernKeePassLibPCL.Serialization
private Stream AttachStreamEncryptor(Stream s)
{
MemoryStream ms = new MemoryStream();
using (var ms = new MemoryStream())
{
Debug.Assert(m_pbMasterSeed != null);
Debug.Assert(m_pbMasterSeed.Length == 32);
ms.Write(m_pbMasterSeed, 0, 32);
Debug.Assert(m_pbMasterSeed != null);
Debug.Assert(m_pbMasterSeed.Length == 32);
ms.Write(m_pbMasterSeed, 0, 32);
Debug.Assert(m_pwDatabase != null);
Debug.Assert(m_pwDatabase.MasterKey != null);
ProtectedBinary pbinKey = m_pwDatabase.MasterKey.GenerateKey32(
m_pbTransformSeed, m_pwDatabase.KeyEncryptionRounds);
Debug.Assert(pbinKey != null);
if(pbinKey == null)
throw new SecurityException(KLRes.InvalidCompositeKey);
byte[] pKey32 = pbinKey.ReadData();
if((pKey32 == null) || (pKey32.Length != 32))
throw new SecurityException(KLRes.InvalidCompositeKey);
ms.Write(pKey32, 0, 32);
Debug.Assert(m_pwDatabase != null);
Debug.Assert(m_pwDatabase.MasterKey != null);
ProtectedBinary pbinKey = m_pwDatabase.MasterKey.GenerateKey32(
m_pbTransformSeed, m_pwDatabase.KeyEncryptionRounds);
Debug.Assert(pbinKey != null);
if (pbinKey == null)
throw new SecurityException(KLRes.InvalidCompositeKey);
byte[] pKey32 = pbinKey.ReadData();
if ((pKey32 == null) || (pKey32.Length != 32))
throw new SecurityException(KLRes.InvalidCompositeKey);
ms.Write(pKey32, 0, 32);
#if ModernKeePassLibPCL
/*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);
/*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
Array.Clear(pKey32, 0, 32);
ms.Dispose();
Array.Clear(pKey32, 0, 32);
Debug.Assert(CipherPool.GlobalPool != null);
ICipherEngine iEngine = CipherPool.GlobalPool.GetCipher(m_pwDatabase.DataCipherUuid);
if(iEngine == null) throw new SecurityException(KLRes.FileUnknownCipher);
return iEngine.EncryptStream(s, aesKey, m_pbEncryptionIV);
Debug.Assert(CipherPool.GlobalPool != null);
ICipherEngine iEngine = CipherPool.GlobalPool.GetCipher(m_pwDatabase.DataCipherUuid);
if (iEngine == null) throw new SecurityException(KLRes.FileUnknownCipher);
return iEngine.EncryptStream(s, aesKey, m_pbEncryptionIV);
}
}
private void WriteDocument(PwGroup pgDataSource)
@@ -833,7 +836,7 @@ namespace ModernKeePassLibPCL.Serialization
}
[Obsolete]
public static bool WriteEntries(Stream msOutput, PwDatabase pwDatabase,
public static bool WriteEntries(IRandomAccessStream msOutput, PwDatabase pwDatabase,
PwEntry[] vEntries)
{
return WriteEntries(msOutput, vEntries);
@@ -846,7 +849,7 @@ namespace ModernKeePassLibPCL.Serialization
/// <param name="vEntries">Entries to serialize.</param>
/// <returns>Returns <c>true</c>, if the entries were written successfully
/// to the stream.</returns>
public static bool WriteEntries(Stream msOutput, PwEntry[] vEntries)
public static bool WriteEntries(IRandomAccessStream msOutput, PwEntry[] vEntries)
{
/* KdbxFile f = new KdbxFile(pwDatabase);
f.m_format = KdbxFormat.PlainXml;

View File

@@ -5,6 +5,7 @@
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0",
"PInvoke.Windows.Core": "0.5.97",
"Portable.BouncyCastle": "1.8.1.1",
"Splat": "2.0.0",
"System.Runtime.WindowsRuntime": "4.3.0",
"System.Xml.ReaderWriter": "4.3.0",

View File

@@ -120,6 +120,29 @@
"lib/netstandard1.1/PInvoke.Windows.Core.dll": {}
}
},
"Portable.BouncyCastle/1.8.1.1": {
"type": "package",
"dependencies": {
"System.Collections": "4.0.11",
"System.Diagnostics.Debug": "4.0.11",
"System.Globalization": "4.0.11",
"System.IO": "4.1.0",
"System.Linq": "4.1.0",
"System.Reflection": "4.1.0",
"System.Reflection.Extensions": "4.0.1",
"System.Runtime": "4.1.0",
"System.Runtime.Extensions": "4.1.0",
"System.Text.Encoding": "4.0.11",
"System.Threading": "4.0.11",
"System.Threading.Tasks": "4.0.11"
},
"compile": {
"lib/netstandard1.0/crypto.dll": {}
},
"runtime": {
"lib/netstandard1.0/crypto.dll": {}
}
},
"runtime.native.System/4.0.0": {
"type": "package",
"dependencies": {
@@ -545,7 +568,7 @@
]
},
"Microsoft.NETCore.Platforms/1.1.0": {
"sha512": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"sha512": "+XHS7n+M0uDgC28FAzPVRvDG2SvxtkprfAdbd0Cf9Fqa8YgMuXPXvoTB0SW/W/Z6kbuvp0fVeDItXnC9rnL+XA==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -649,7 +672,7 @@
]
},
"Microsoft.NETCore.Targets/1.1.0": {
"sha512": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
"sha512": "dUUadXhJMY9VZYrGVdJDKzcXsYcUmadCTd1Kz4VQgLuZhaC+QlbC7tDkFSE+snB5TBLxmRU3ZfX8ur4buLawqQ==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -661,7 +684,7 @@
]
},
"Microsoft.NETCore.Windows.ApiSets/1.0.1": {
"sha512": "SaToCvvsGMxTgtLv/BrFQ5IFMPRE1zpWbnqbpwykJa8W5XiX82CXI6K2o7yf5xS7EP6t/JzFLV0SIDuWpvBZVw==",
"sha512": "q0mF2juY/56CMT5b+bi8uh90ZiH1DB8TCoaK6nOTRZPQmRiqz+8JuOIu1upvy21SZHoesIl9alCFXK5MlfKFuQ==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -672,13 +695,13 @@
]
},
"NETStandard.Library/1.6.0": {
"sha512": "ypsCvIdCZ4IoYASJHt6tF2fMo7N30NLgV1EbmC+snO490OMl9FvVxmumw14rhReWU3j3g7BYudG6YCrchwHJlA==",
"sha512": "jm2kphgr45o12LIu+N0VGATQnkOhTKVUmDT3tHCiO1FYlPH8p0RR9PSldA2+wLLJfofb260sBCnB6ZIywLm81w==",
"type": "package",
"files": [
"NETStandard.Library.1.6.0.nupkg.sha512",
"NETStandard.Library.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt"
"dotnet_library_license.txt",
"netstandard.library.1.6.0.nupkg.sha512",
"netstandard.library.nuspec"
]
},
"PInvoke.Windows.Core/0.5.97": {
@@ -699,15 +722,33 @@
"lib/portable-net45+win8+wpa81/PInvoke.Windows.Core.xml"
]
},
"Portable.BouncyCastle/1.8.1.1": {
"sha512": "rv/VIvOMhZaZ6iSyKeJiwrYWq4J05Td59VekLxmLD+nR0liHFLPtkUtPfJL2sMaVghy1PpF/HjSvvcoNZQtlGA==",
"type": "package",
"files": [
"Portable.BouncyCastle.1.8.1.1.nupkg.sha512",
"Portable.BouncyCastle.nuspec",
"Readme.html",
"lib/netstandard1.0/crypto.dll",
"lib/netstandard1.0/crypto.pdb",
"lib/netstandard1.0/crypto.xml",
"lib/netstandard1.3/crypto.dll",
"lib/netstandard1.3/crypto.pdb",
"lib/netstandard1.3/crypto.xml",
"lib/portable-net4+sl5+wp8+win8+wpa81/crypto.dll",
"lib/portable-net4+sl5+wp8+win8+wpa81/crypto.pdb",
"lib/portable-net4+sl5+wp8+win8+wpa81/crypto.xml"
]
},
"runtime.native.System/4.0.0": {
"sha512": "QfS/nQI7k/BLgmLrw7qm7YBoULEvgWnPI+cYsbfCVFTW8Aj+i8JhccxcFMu1RWms0YZzF+UHguNBK4Qn89e2Sg==",
"sha512": "QcQUghVj1shUpPVYepSVQL1K4hhN7Nu1orN0snxBVi+6x8+fHLPoqJQrH4cKAOX8Lr5JIFrIljv/rS3bfeSqQg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/netstandard1.0/_._",
"runtime.native.System.4.0.0.nupkg.sha512",
"runtime.native.System.nuspec"
"runtime.native.system.4.0.0.nupkg.sha512",
"runtime.native.system.nuspec"
]
},
"Splat/2.0.0": {
@@ -737,7 +778,7 @@
]
},
"System.Collections/4.0.11": {
"sha512": "YUJGz6eFKqS0V//mLt25vFGrrCvOnsXjlvFQs+KimpwNxug9x0Pzy4PlFMU3Q2IzqAa9G2L4LsK3+9vCBK7oTg==",
"sha512": "gI47opqDjF8kqrCmjKuhLivUmd0wqU/Gtj7SgDQg8OGyVVbnMZfFM+q5NU8xLisSt8iPtgecS8sKBNmJKC9Mlw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -802,7 +843,7 @@
]
},
"System.Collections.Concurrent/4.0.12": {
"sha512": "2gBcbb3drMLgxlI0fBfxMA31ec6AEyYCHygGse4vxceJan8mRIWeKJ24BFzN7+bi/NFTgdIgufzb94LWO5EERQ==",
"sha512": "GeDttrjKz39uj/KC6+uyI40Qp6hRgeI9BrBUwJTKSF15FklM5Zrq4gaWDQqzNP7kC3i+088+mwRr/o3BT3j7Cg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -867,7 +908,7 @@
]
},
"System.Diagnostics.Debug/4.0.11": {
"sha512": "w5U95fVKHY4G8ASs/K5iK3J5LY+/dLFd4vKejsnI/ZhBsWS9hQakfx3Zr7lRWKg4tAw9r4iktyvsTagWkqYCiw==",
"sha512": "pvtcqWa9XnPsIXfD8nF8aoU1TWE8RpMv/WnZiNG4CEmGJjRvCPTNaXFrA/lXPimAfZxiEocPwvz9caGdt6tpuA==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -932,7 +973,7 @@
]
},
"System.Diagnostics.Tools/4.0.1": {
"sha512": "xBfJ8pnd4C17dWaC9FM6aShzbJcRNMChUMD42I6772KGGrqaFdumwhn9OdM68erj1ueNo3xdQ1EwiFjK5k8p0g==",
"sha512": "5edPT/p4Vj3nu9d8cZ9nNojrbbzrFOMTBNTd/8k/y45AAJ8AP0fzKyGh1jFbggASl0tYqhAFj+GjdNBZUAE/kA==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -986,7 +1027,7 @@
]
},
"System.Diagnostics.Tracing/4.1.0": {
"sha512": "vDN1PoMZCkkdNjvZLql592oYJZgS7URcJzJ7bxeBgGtx5UtR5leNm49VmfHGqIffX4FKacHbI3H6UyNSHQknBg==",
"sha512": "T0fLVaiUHm48/lp0UdTDOpKARVjsLF3vgPLsQ39gbjcl8M86mBcuHByeUE/zWlmF+NG/sOLrpMvsoZcs0t8W5Q==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1073,7 +1114,7 @@
]
},
"System.Globalization/4.0.11": {
"sha512": "B95h0YLEL2oSnwF/XjqSWKnwKOy/01VWkNlsCeMTFJLLabflpGV26nK164eRs5GiaRSBGpOxQ3pKoSnnyZN5pg==",
"sha512": "jKDAH5XVjHjweq8crjx3BSlUQgg7xAASK4pBQVX8xUn1mHZjw0Fm/s+Svih8PyI1hhpR8zZjvvxholEMV4OEaw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1138,7 +1179,7 @@
]
},
"System.IO/4.3.0": {
"sha512": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"sha512": "YsCDVvNbX1fQsiQuBRb7Wy/v+L14iJ0JhzInNXsblcU2wUZ8fD33Q5RBRZ4PUu2iZKQ6KnrfaOxWScxoGcIoPA==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1216,11 +1257,9 @@
]
},
"System.IO.Compression/4.1.0": {
"sha512": "TjnBS6eztThSzeSib+WyVbLzEdLKUcEHN69VtS3u8aAsSc18FU6xCZlNWWsEd8SKcXAE+y1sOu7VbU8sUeM0sg==",
"sha512": "j4zrCXlVjYGIp55UA34nhjpamFzfKDPImwlxlJetNJktbMTUta69sLOiWBeykFuBIYH/ejv1JpM6V+iyVyzflQ==",
"type": "package",
"files": [
"System.IO.Compression.4.1.0.nupkg.sha512",
"System.IO.Compression.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -1280,11 +1319,13 @@
"ref/xamarinwatchos10/_._",
"runtimes/unix/lib/netstandard1.3/System.IO.Compression.dll",
"runtimes/win/lib/net46/System.IO.Compression.dll",
"runtimes/win/lib/netstandard1.3/System.IO.Compression.dll"
"runtimes/win/lib/netstandard1.3/System.IO.Compression.dll",
"system.io.compression.4.1.0.nupkg.sha512",
"system.io.compression.nuspec"
]
},
"System.Linq/4.1.0": {
"sha512": "bQ0iYFOQI0nuTnt+NQADns6ucV4DUvMdwN6CbkB1yj8i7arTGiTN5eok1kQwdnnNWSDZfIUySQY+J3d5KjWn0g==",
"sha512": "EX0TJleLmwt3ZxxMBhVcOrtfRcLcfhC/U3aj/IgFMnk2ZEqSGIFv3XHdcgNzjUIahKGH7q7lJCRhvy+E3diclg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1353,11 +1394,9 @@
]
},
"System.Linq.Expressions/4.1.0": {
"sha512": "I+y02iqkgmCAyfbqOmSDOgqdZQ5tTj80Akm5BPSS8EeB0VGWdy6X1KCoYe8Pk6pwDoAKZUOdLVxnTJcExiv5zw==",
"sha512": "ZwYLHQw/d7Gej9SlHzd1Y9RUGEIIj0hjb6Cbv+1m49N74PSYaSWkXuvCS50hA0AnpvoTQcS6S0cULw5FeiYU0Q==",
"type": "package",
"files": [
"System.Linq.Expressions.4.1.0.nupkg.sha512",
"System.Linq.Expressions.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -1430,15 +1469,15 @@
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._",
"runtimes/aot/lib/netcore50/System.Linq.Expressions.dll"
"runtimes/aot/lib/netcore50/System.Linq.Expressions.dll",
"system.linq.expressions.4.1.0.nupkg.sha512",
"system.linq.expressions.nuspec"
]
},
"System.Net.Http/4.1.0": {
"sha512": "ULq9g3SOPVuupt+Y3U+A37coXzdNisB1neFCSKzBwo182u0RDddKJF8I5+HfyXqK6OhJPgeoAwWXrbiUXuRDsg==",
"sha512": "yCSes6ImS+SQV3IAQATC+sKIEZKTNhbVYPUZxtvlymVAPnyW2UhhyUFaWoEoVj5uLH+JXYoPk4o7onNAx+xOWg==",
"type": "package",
"files": [
"System.Net.Http.4.1.0.nupkg.sha512",
"System.Net.Http.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/Xamarinmac20/_._",
@@ -1509,15 +1548,15 @@
"runtimes/unix/lib/netstandard1.6/System.Net.Http.dll",
"runtimes/win/lib/net46/System.Net.Http.dll",
"runtimes/win/lib/netcore50/System.Net.Http.dll",
"runtimes/win/lib/netstandard1.3/System.Net.Http.dll"
"runtimes/win/lib/netstandard1.3/System.Net.Http.dll",
"system.net.http.4.1.0.nupkg.sha512",
"system.net.http.nuspec"
]
},
"System.Net.Primitives/4.0.11": {
"sha512": "hVvfl4405DRjA2408luZekbPhplJK03j2Y2lSfMlny7GHXlkByw1iLnc9mgKW0GdQn73vvMcWrWewAhylXA4Nw==",
"sha512": "ZSrInO8QdqT1KMPpKzgcDGMG3Y3LnC/EI6wGvbegkPfeIFPgB+ZM0SUOu+jGbOVFWZYhi1tLmh6fVUMeNJXGpQ==",
"type": "package",
"files": [
"System.Net.Primitives.4.0.11.nupkg.sha512",
"System.Net.Primitives.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -1585,15 +1624,15 @@
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._"
"ref/xamarinwatchos10/_._",
"system.net.primitives.4.0.11.nupkg.sha512",
"system.net.primitives.nuspec"
]
},
"System.ObjectModel/4.0.12": {
"sha512": "tAgJM1xt3ytyMoW4qn4wIqgJYm7L7TShRZG4+Q4Qsi2PCcj96pXN7nRywS9KkB3p/xDUjc2HSwP9SROyPYDYKQ==",
"sha512": "WW6Li08eAvqWC2wuEL5rfcRj7MnkQmuvi33sCNQDO1FCEik1k2gjB9MRA3FCaZZXXoPBWlKgk48NRF1jtuGfXg==",
"type": "package",
"files": [
"System.ObjectModel.4.0.12.nupkg.sha512",
"System.ObjectModel.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -1652,11 +1691,13 @@
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._"
"ref/xamarinwatchos10/_._",
"system.objectmodel.4.0.12.nupkg.sha512",
"system.objectmodel.nuspec"
]
},
"System.Reflection/4.1.0": {
"sha512": "JCKANJ0TI7kzoQzuwB/OoJANy1Lg338B6+JVacPl4TpUwi3cReg3nMLplMq2uqYfHFQpKIlHAUVAJlImZz/4ng==",
"sha512": "HpJ+0KwTFMMbUyw4wyFozfZOgRjTQc9XZ7gf+jGMZldTd/DE5x0A2hphJcr9GMugfk/varQj5eQV90fhhQHPXQ==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1734,11 +1775,9 @@
]
},
"System.Reflection.Extensions/4.0.1": {
"sha512": "GYrtRsZcMuHF3sbmRHfMYpvxZoIN2bQGrYGerUiWLEkqdEUQZhH3TRSaC/oI4wO0II1RKBPlpIa1TOMxIcOOzQ==",
"sha512": "zg11axddROZueNDNitrQ0owzvQlCLAjN9G/+/k6RMICrkPRUSiO6UQ/T9Ro6/IBPy0wcQsTdWgghbGj17hnZ3A==",
"type": "package",
"files": [
"System.Reflection.Extensions.4.0.1.nupkg.sha512",
"System.Reflection.Extensions.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -1784,11 +1823,13 @@
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._"
"ref/xamarinwatchos10/_._",
"system.reflection.extensions.4.0.1.nupkg.sha512",
"system.reflection.extensions.nuspec"
]
},
"System.Reflection.Primitives/4.0.1": {
"sha512": "4inTox4wTBaDhB7V3mPvp9XlCbeGYWVEM9/fXALd52vNEAVisc1BoVWQPuUuD0Ga//dNbA/WeMy9u9mzLxGTHQ==",
"sha512": "Pszp2aaEvrwJgXNVqa01yIturWLch/rQ0qAyK79JAFt67YmvRczQ/k/bL6BxNVsSKlllLqywK0eK1M+AoquCoQ==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1842,7 +1883,7 @@
]
},
"System.Resources.ResourceManager/4.0.1": {
"sha512": "TxwVeUNoTgUOdQ09gfTjvW411MF+w9MBYL7AtNVc+HtBCFlutPLhUCdZjNkjbhj3bNQWMdHboF0KIWEOjJssbA==",
"sha512": "pGR3OtGJxTKLRTGwPvfoVc/oEKVcyIbRvvhrojBDlj9Jh2o35t5OAj4jME2K7xU61dy/ih6MtSq7oEXqfCW8tA==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1896,7 +1937,7 @@
]
},
"System.Runtime/4.3.0": {
"sha512": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"sha512": "a+38DiHlk4UA1NMs7Ty0/izJb/ukQtEhDgoy2xrGppdA/nVOkOC1JtR9HCcYYHfxXxQNNsjQ66NNvrbM3oVTrw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -1985,7 +2026,7 @@
]
},
"System.Runtime.Extensions/4.1.0": {
"sha512": "CUOHjTT/vgP0qGW22U4/hDlOqXmcPq5YicBaXdUR2UiUoLwBT+olO6we4DVbq57jeX5uXH2uerVZhf0qGj+sVQ==",
"sha512": "6HJxJWJ7NqmB7URzrQ6wcAnMknVlTASGjSowDobDj8UBdwytwi68R11lsEx3u1hOwA5eLAsDk4zKQ8N/8RV5uw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2063,7 +2104,7 @@
]
},
"System.Runtime.InteropServices/4.1.0": {
"sha512": "16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==",
"sha512": "iEbhIhq4zSmMaCq2i0iGN8UjSww+qjjciGlPwEJulxXawSFyvkWClYkRbQjuJBhp4e8QEdIcbQsijPsTYvin6g==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2150,11 +2191,9 @@
]
},
"System.Runtime.InteropServices.RuntimeInformation/4.0.0": {
"sha512": "hWPhJxc453RCa8Z29O91EmfGeZIHX1ZH2A8L6lYQVSaKzku2DfArSfMEb1/MYYzPQRJZeu0c9dmYeJKxW5Fgng==",
"sha512": "vr3mNWma7l4pwFRuH+6qDzw8oNA3ds0vA2iArlsMiu5P6q+sPBb2dtrnBsosBzz9KxYyYmNHwLrTtfAteSXGGw==",
"type": "package",
"files": [
"System.Runtime.InteropServices.RuntimeInformation.4.0.0.nupkg.sha512",
"System.Runtime.InteropServices.RuntimeInformation.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -2177,11 +2216,13 @@
"runtimes/unix/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll",
"runtimes/win/lib/net45/System.Runtime.InteropServices.RuntimeInformation.dll",
"runtimes/win/lib/netcore50/System.Runtime.InteropServices.RuntimeInformation.dll",
"runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll"
"runtimes/win/lib/netstandard1.1/System.Runtime.InteropServices.RuntimeInformation.dll",
"system.runtime.interopservices.runtimeinformation.4.0.0.nupkg.sha512",
"system.runtime.interopservices.runtimeinformation.nuspec"
]
},
"System.Runtime.Numerics/4.0.1": {
"sha512": "+XbKFuzdmLP3d1o9pdHu2nxjNr2OEPqGzKeegPLCUMM71a0t50A/rOcIRmGs9wR7a8KuHX6hYs/7/TymIGLNqg==",
"sha512": "/o7jRC8CE9DNZLNRBrBo83xJSUUD4y7PN1nKat3AtyrQCnopV+wu/WVzOfxmpaaIezo79SJ6/B9m0vaWqOl+Jg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2288,7 +2329,7 @@
]
},
"System.Text.Encoding/4.3.0": {
"sha512": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"sha512": "3hnC4XGk/ip1HnQuDpA5L3aOsYXSl4I7OlwSb40WlTIEVtOP9VrcqPN4kuT2L3a1kXXr8emjPePQcbtYVjRvjw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2353,7 +2394,7 @@
]
},
"System.Text.Encoding.Extensions/4.0.11": {
"sha512": "jtbiTDtvfLYgXn8PTfWI+SiBs51rrmO4AAckx4KR6vFK9Wzf6tI8kcRdsYQNwriUeQ1+CtQbM1W4cMbLXnj/OQ==",
"sha512": "ENbXs99/jOY4tgo46ljaXBx9Bx8d2ql6ujhAkLeKRHIiBIFSHmZ6DHls2lglUubMrCC+ad4XOakiLVZGhEsfyw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2418,7 +2459,7 @@
]
},
"System.Text.RegularExpressions/4.1.0": {
"sha512": "i88YCXpRTjCnoSQZtdlHkAOx4KNNik4hMy83n0+Ftlb7jvV6ZiZWMpnEZHhjBp6hQVh8gWd/iKNPzlPF7iyA2g==",
"sha512": "v6JrJPeaPhlAp5V8u4Usk8W/+pgDqVTAt5oawH7scq1ycxYnLS2luEWQStZc+5WqGJS5qNLCh3Ygm/EUoLkbyg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2498,7 +2539,7 @@
]
},
"System.Threading/4.0.11": {
"sha512": "N+3xqIcg3VDKyjwwCGaZ9HawG9aC6cSDI+s7ROma310GQo8vilFZa86hqKppwTHleR/G0sfOzhvgnUxWCR/DrQ==",
"sha512": "SPtgIenWg9xMMBKVpkAWCiebJ1posiEPYhMwT6eJpOmZiVJm73q8/4/z1QuD0C0iWLD3Dj8MbQ39hxH5VCUnCw==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2566,7 +2607,7 @@
]
},
"System.Threading.Tasks/4.3.0": {
"sha512": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"sha512": "1je8yxoIxd0iVjfJbb9DXNIfTt6ESMRIwNwoaB0WhxSfJMLOhfJ3mb9UQsa6Q/98g6jEOyFdSAbr+fPEgwbKUg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2631,11 +2672,9 @@
]
},
"System.Threading.Timer/4.0.1": {
"sha512": "saGfUV8uqVW6LeURiqxcGhZ24PzuRNaUBtbhVeuUAvky1naH395A/1nY0P2bWvrw/BreRtIB/EzTDkGBpqCwEw==",
"sha512": "yl+mJ0W5KVBXZgrHE4DVfjI/QDJXuf5rTpCjtHuy+PKxqgrBsF1IZI2jZeHtmBGAgdG0TkJsCTT+4VqT9BSw1g==",
"type": "package",
"files": [
"System.Threading.Timer.4.0.1.nupkg.sha512",
"System.Threading.Timer.nuspec",
"ThirdPartyNotices.txt",
"dotnet_library_license.txt",
"lib/MonoAndroid10/_._",
@@ -2679,11 +2718,13 @@
"ref/xamarinios10/_._",
"ref/xamarinmac20/_._",
"ref/xamarintvos10/_._",
"ref/xamarinwatchos10/_._"
"ref/xamarinwatchos10/_._",
"system.threading.timer.4.0.1.nupkg.sha512",
"system.threading.timer.nuspec"
]
},
"System.Xml.ReaderWriter/4.3.0": {
"sha512": "GrprA+Z0RUXaR4N7/eW71j1rgMnEnEVlgii49GZyAjTH7uliMnrOU3HNFBr6fEDBCJCIdlVNq9hHbaDR621XBA==",
"sha512": "41StQbCnhTjv/daEuN55cqY4rUYP1NQI9a8cQktBxDbF5QLFsIvcr9mIFGQ2nrzrk3DYHKwpJ9AkVuMiYymtHg==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2752,7 +2793,7 @@
]
},
"System.Xml.XDocument/4.0.11": {
"sha512": "Mk2mKmPi0nWaoiYeotq1dgeNK1fqWh61+EK+w4Wu8SWuTYLzpUnschb59bJtGywaPq7SmTuPf44wrXRwbIrukg==",
"sha512": "zjpx57E3HcPYBdHWFG7y7L15KmKv4O6vQXz/MwF9s3QEwIVZRsUrrCLx0ETHRfll9uXplN/HBdCNA6E/bjAd7w==",
"type": "package",
"files": [
"ThirdPartyNotices.txt",
@@ -2922,6 +2963,7 @@
"Microsoft.NETCore.Portable.Compatibility >= 1.0.1",
"NETStandard.Library >= 1.6.0",
"PInvoke.Windows.Core >= 0.5.97",
"Portable.BouncyCastle >= 1.8.1.1",
"Splat >= 2.0.0",
"System.Runtime.WindowsRuntime >= 4.3.0",
"System.Xml.ReaderWriter >= 4.3.0",