Update Lib to version 2.44

Update nuget packages
This commit is contained in:
Geoffroy BONNEVILLE
2020-03-16 15:28:05 +01:00
parent 3a85b60e58
commit b8240d482f
108 changed files with 1102 additions and 595 deletions

View File

@@ -1,6 +1,6 @@
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2019 Dominik Reichl <dominik.reichl@t-online.de>
Copyright (C) 2003-2020 Dominik Reichl <dominik.reichl@t-online.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -597,20 +597,34 @@ namespace ModernKeePassLib.Utility
if(sSource == null) throw new ArgumentNullException("sSource");
if(sTarget == null) throw new ArgumentNullException("sTarget");
const int nBufSize = 4096;
byte[] pbBuf = new byte[nBufSize];
const int cbBuf = 4096;
byte[] pbBuf = new byte[cbBuf];
while(true)
{
int nRead = sSource.Read(pbBuf, 0, nBufSize);
if(nRead == 0) break;
int cbRead = sSource.Read(pbBuf, 0, cbBuf);
if(cbRead == 0) break;
sTarget.Write(pbBuf, 0, nRead);
sTarget.Write(pbBuf, 0, cbRead);
}
// Do not close any of the streams
}
public static byte[] Read(Stream s)
{
if(s == null) throw new ArgumentNullException("s");
byte[] pb;
using(MemoryStream ms = new MemoryStream())
{
MemUtil.CopyStream(s, ms);
pb = ms.ToArray();
}
return pb;
}
public static byte[] Read(Stream s, int nCount)
{
if(s == null) throw new ArgumentNullException("s");