Skip to content

Commit

Permalink
Fix corrupt encryption
Browse files Browse the repository at this point in the history
  • Loading branch information
ermshiperete committed Jun 10, 2024
1 parent 33fbe1a commit 1d8e95c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.4.1] - 2024-06-10

### Fixed

- last version corrupted the encrypted file. This is fixed again.

## [1.4.0] - 2024-04-09

### Added
Expand Down Expand Up @@ -298,8 +304,9 @@ Re-release

- Initial beta version

[Unreleased]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.4.0...master
[Unreleased]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.4.1...master

[1.4.1]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.3.3...v1.4.0
[1.3.3]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.3.2...v1.3.3
[1.3.2]: https://github.com/ermshiperete/DigitaleBriefwahl/compare/v1.3.1...v1.3.2
Expand Down
20 changes: 10 additions & 10 deletions DigitaleBriefwahl/Encryption/EncryptVote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ private static byte[] CompressData(byte[] inputData)

// we want to Generate compressed data. This might be a user option later,
// in which case we would pass in bOut.
using (var pOut = lData.Open(
compressedStream, // the compressed output stream
PgpLiteralData.Binary,
"data", // "filename" to store
inputData.Length, // length of clear data
DateTime.UtcNow // current time
))
{
pOut.Write(inputData, 0, inputData.Length);
}
using var pOut = lData.Open(
compressedStream, // the compressed output stream
PgpLiteralData.Binary,
"data", // "filename" to store
inputData.Length, // length of clear data
DateTime.UtcNow // current time
);
pOut.Write(inputData, 0, inputData.Length);
pOut.Close();
compressedStream.Close();
return stream.ToArray();
}

Expand Down

0 comments on commit 1d8e95c

Please sign in to comment.