Hashblockstream test now works

This commit is contained in:
2017-10-23 11:44:22 +02:00
committed by BONNEVILLE Geoffroy
parent 8c09d266e8
commit 2bbd931b1a
6 changed files with 24 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
<package >
<metadata>
<id>ModernKeePassLib</id>
<version>2.37.2000</version>
<version>2.37.3000</version>
<title>ModernKeePassLib</title>
<authors>Geoffroy Bonneville</authors>
<owners>Geoffroy Bonneville</owners>
@@ -10,7 +10,7 @@
<projectUrl>https://github.com/wismna/ModernKeePass</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Portable KeePass Password Management Library that targets .Net Standard and WinRT</description>
<releaseNotes>This version compiles - tests in progress</releaseNotes>
<releaseNotes>Hashblockstream write works - now tests results on par with 2.28</releaseNotes>
<copyright>Copyright © 2017 Geoffroy Bonneville</copyright>
<tags>KeePass KeePassLib Portable PCL NetStandard</tags>
<dependencies>

View File

@@ -1,6 +1,6 @@
/*
KeePass Password Safe - The Open-Source Password Manager
Copyright (C) 2003-2014 Dominik Reichl <dominik.reichl@t-online.de>
Copyright (C) 2003-2017 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
@@ -20,6 +20,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
#if ModernKeePassLib
using ModernKeePassLib.Native;
@@ -282,7 +283,7 @@ namespace ModernKeePassLib.Serialization
if(m_nBufferPos > 0)
{
byte[] pbHash = CryptoUtil.HashSha256(m_pbBuffer, 0, m_nBufferPos);
byte[] pbHash = CryptoUtil.HashSha256(m_pbBuffer.Where((x, i) => i < m_nBufferPos).ToArray(), 0, m_nBufferPos);
// For KeePassLibSD:
// SHA256Managed sha256 = new SHA256Managed();