mirror of
https://github.com/moparisthebest/keepass2android
synced 2025-02-16 15:00:12 -05:00
switch back to Mono implementation for GZip
This commit is contained in:
parent
8fc98df53b
commit
82b288ae71
@ -162,10 +162,6 @@
|
|||||||
<Project>{70D3844A-D9FA-4A64-B205-A84C6A822196}</Project>
|
<Project>{70D3844A-D9FA-4A64-B205-A84C6A822196}</Project>
|
||||||
<Name>KP2AKdbLibraryBinding</Name>
|
<Name>KP2AKdbLibraryBinding</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\ZlibAndroid\ZlibAndroid.csproj">
|
|
||||||
<Project>{6C29A7E7-E016-4FC1-B1A0-DEE26AC711BB}</Project>
|
|
||||||
<Name>ZlibAndroid</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
|
||||||
<Import Project="..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets" Condition="Exists('..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets')" />
|
<Import Project="..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets" Condition="Exists('..\packages\Xamarin.Insights.1.11.3\build\MonoAndroid10\Xamarin.Insights.targets')" />
|
||||||
|
@ -114,7 +114,7 @@ namespace KeePassLib.Serialization
|
|||||||
!m_bRepairMode);
|
!m_bRepairMode);
|
||||||
|
|
||||||
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
|
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
|
||||||
readerStream = new Ionic.Zlib.GZipStream(sHashed, Ionic.Zlib.CompressionMode.Decompress);
|
readerStream = new GZipStream(sHashed, CompressionMode.Decompress);
|
||||||
else readerStream = sHashed;
|
else readerStream = sHashed;
|
||||||
}
|
}
|
||||||
else if(kdbFormat == KdbxFormat.PlainXml)
|
else if(kdbFormat == KdbxFormat.PlainXml)
|
||||||
|
@ -115,7 +115,7 @@ namespace KeePassLib.Serialization
|
|||||||
Stream sHashed = new HashedBlockStream(sEncrypted, true);
|
Stream sHashed = new HashedBlockStream(sEncrypted, true);
|
||||||
|
|
||||||
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
|
if(m_pwDatabase.Compression == PwCompressionAlgorithm.GZip)
|
||||||
writerStream = new Ionic.Zlib.GZipStream(sHashed, Ionic.Zlib.CompressionMode.Compress);
|
writerStream = new GZipStream(sHashed, CompressionMode.Compress);
|
||||||
else
|
else
|
||||||
writerStream = sHashed;
|
writerStream = sHashed;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ namespace KeePassLib.Translation
|
|||||||
FileAccess.Write, FileShare.None);
|
FileAccess.Write, FileShare.None);
|
||||||
|
|
||||||
#if !KeePassLibSD
|
#if !KeePassLibSD
|
||||||
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fs, Ionic.Zlib.CompressionMode.Compress);
|
GZipStream gz = new GZipStream(fs, CompressionMode.Compress);
|
||||||
#else
|
#else
|
||||||
GZipOutputStream gz = new GZipOutputStream(fs);
|
GZipOutputStream gz = new GZipOutputStream(fs);
|
||||||
#endif
|
#endif
|
||||||
@ -132,7 +132,7 @@ namespace KeePassLib.Translation
|
|||||||
FileAccess.Read, FileShare.Read);
|
FileAccess.Read, FileShare.Read);
|
||||||
|
|
||||||
#if !KeePassLibSD
|
#if !KeePassLibSD
|
||||||
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fs, Ionic.Zlib.CompressionMode.Decompress);
|
GZipStream gz = new GZipStream(fs, CompressionMode.Decompress);
|
||||||
#else
|
#else
|
||||||
GZipInputStream gz = new GZipInputStream(fs);
|
GZipInputStream gz = new GZipInputStream(fs);
|
||||||
#endif
|
#endif
|
||||||
|
@ -68,7 +68,7 @@ namespace KeePassLib.Utility
|
|||||||
|
|
||||||
FileStream fsOut = new FileStream(strPath, FileMode.Create,
|
FileStream fsOut = new FileStream(strPath, FileMode.Create,
|
||||||
FileAccess.Write, FileShare.None);
|
FileAccess.Write, FileShare.None);
|
||||||
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(fsOut, CompressionMode.Compress);
|
GZipStream gz = new GZipStream(fsOut, CompressionMode.Compress);
|
||||||
m_swOut = new StreamWriter(gz);
|
m_swOut = new StreamWriter(gz);
|
||||||
|
|
||||||
AppLogEx.Log("Started logging on " + dtNow.ToString("s") + ".");
|
AppLogEx.Log("Started logging on " + dtNow.ToString("s") + ".");
|
||||||
|
@ -430,7 +430,7 @@ namespace KeePassLib.Utility
|
|||||||
if(pbData.Length == 0) return pbData;
|
if(pbData.Length == 0) return pbData;
|
||||||
|
|
||||||
MemoryStream msCompressed = new MemoryStream();
|
MemoryStream msCompressed = new MemoryStream();
|
||||||
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(msCompressed, Ionic.Zlib.CompressionMode.Compress);
|
GZipStream gz = new GZipStream(msCompressed, CompressionMode.Compress);
|
||||||
MemoryStream msSource = new MemoryStream(pbData, false);
|
MemoryStream msSource = new MemoryStream(pbData, false);
|
||||||
MemUtil.CopyStream(msSource, gz);
|
MemUtil.CopyStream(msSource, gz);
|
||||||
gz.Close();
|
gz.Close();
|
||||||
@ -447,7 +447,7 @@ namespace KeePassLib.Utility
|
|||||||
if(pbCompressed.Length == 0) return pbCompressed;
|
if(pbCompressed.Length == 0) return pbCompressed;
|
||||||
|
|
||||||
MemoryStream msCompressed = new MemoryStream(pbCompressed, false);
|
MemoryStream msCompressed = new MemoryStream(pbCompressed, false);
|
||||||
Ionic.Zlib.GZipStream gz = new Ionic.Zlib.GZipStream(msCompressed, Ionic.Zlib.CompressionMode.Decompress);
|
GZipStream gz = new GZipStream(msCompressed, CompressionMode.Decompress);
|
||||||
MemoryStream msData = new MemoryStream();
|
MemoryStream msData = new MemoryStream();
|
||||||
MemUtil.CopyStream(gz, msData);
|
MemUtil.CopyStream(gz, msData);
|
||||||
gz.Close();
|
gz.Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user