Skip to content

Commit

Permalink
Merge pull request #49 from mattosaurus/development
Browse files Browse the repository at this point in the history
GenerateKey should overwrite file
  • Loading branch information
mattosaurus authored Nov 20, 2019
2 parents 31479ef + 4ad1b7e commit c05638e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions PgpCore/PGP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,8 @@ public void GenerateKey(string publicKeyFilePath, string privateKeyFilePath, str
if (String.IsNullOrEmpty(privateKeyFilePath))
throw new ArgumentException("PrivateKeyFilePath");

using (Stream pubs = File.Open(publicKeyFilePath, FileMode.OpenOrCreate))
using (Stream pris = File.Open(privateKeyFilePath, FileMode.OpenOrCreate))
using (Stream pubs = File.Open(publicKeyFilePath, FileMode.Create))
using (Stream pris = File.Open(privateKeyFilePath, FileMode.Create))
GenerateKey(pubs, pris, username, password, strength, certainty);
}

Expand Down
6 changes: 3 additions & 3 deletions PgpCore/PgpCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<PackageProjectUrl>https://github.com/mattosaurus/PgpCore</PackageProjectUrl>
<RepositoryUrl>https://github.com/mattosaurus/PgpCore</RepositoryUrl>
<PackageTags>PGP .NET Core</PackageTags>
<Version>2.1.0</Version>
<Version>2.1.1</Version>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<PackageReleaseNotes>v2.1.0 - Add HashAlgorithmTag option to constructor and strongly sign package.</PackageReleaseNotes>
<FileVersion>2.1.1.0</FileVersion>
<PackageReleaseNotes>v2.1.1 - Recreate key file if already exists rather than appending on to.</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>PgpCoreKey.pfx</AssemblyOriginatorKeyFile>
Expand Down

0 comments on commit c05638e

Please sign in to comment.