From 9be7f0f0271ad221b4035b8c87f37f1d0a3a7538 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Wed, 2 Nov 2022 17:34:30 +0700 Subject: AssemblyTitle and PackageIcon --- crypto/src/BouncyCastle.Crypto.csproj | 24 ++++++++++++------------ crypto/src/bcpg/ArmoredOutputStream.cs | 11 ++++++++++- packageIcon.png | Bin 0 -> 58001 bytes 3 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 packageIcon.png diff --git a/crypto/src/BouncyCastle.Crypto.csproj b/crypto/src/BouncyCastle.Crypto.csproj index 05abc2efe..5b304b763 100644 --- a/crypto/src/BouncyCastle.Crypto.csproj +++ b/crypto/src/BouncyCastle.Crypto.csproj @@ -8,12 +8,14 @@ 1591 BouncyCastle.Cryptography + BouncyCastle.NET Cryptography ($(TargetFramework)) Legion of the Bouncy Castle Inc. Copyright © Legion of the Bouncy Castle Inc. 2000-2022 embedded BouncyCastle.NET is a popular cryptography library for .NET - true + true + packageIcon.png https://www.bouncycastle.org/images/csharp_logo.gif BouncyCastle.Cryptography LICENSE.md @@ -24,7 +26,7 @@ BouncyCastle.NET git https://github.com/bcgit/bc-csharp - BouncyCastle.NET Cryptography ($(TargetFramework)) + BouncyCastle.NET Cryptography @@ -39,18 +41,11 @@ + + + - - - True - \ - - - True - \ - - all @@ -66,4 +61,9 @@ + + + + + diff --git a/crypto/src/bcpg/ArmoredOutputStream.cs b/crypto/src/bcpg/ArmoredOutputStream.cs index 7f3bcc2ef..bfed1972a 100644 --- a/crypto/src/bcpg/ArmoredOutputStream.cs +++ b/crypto/src/bcpg/ArmoredOutputStream.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; +using System.Reflection; using Org.BouncyCastle.Utilities; using Org.BouncyCastle.Utilities.Collections; @@ -98,7 +99,15 @@ namespace Org.BouncyCastle.Bcpg private static readonly string footerStart = "-----END PGP "; private static readonly string footerTail = "-----"; - private static readonly string Version = "BCPG C# v" + typeof(ArmoredOutputStream).Assembly.GetName().Version; + private static string CreateVersion() + { + var assembly = Assembly.GetExecutingAssembly(); + var title = assembly.GetCustomAttribute().Title; + var version = assembly.GetCustomAttribute().InformationalVersion; + return title + " v" + version; + } + + private static readonly string Version = CreateVersion(); private readonly IDictionary> m_headers; diff --git a/packageIcon.png b/packageIcon.png new file mode 100644 index 000000000..ecd478c9a Binary files /dev/null and b/packageIcon.png differ -- cgit 1.4.1