<PackageReference Include="BouncyCastle.Cryptography" Version="2.3.0" />

Org.BouncyCastle.Bcpg.OpenPgp.PgpUtilities

public sealed class PgpUtilities
namespace Org.BouncyCastle.Bcpg.OpenPgp { public sealed class PgpUtilities { public static MPInteger[] DsaSigToMpi(byte[] encoding); public static MPInteger[] RsaSigToMpi(byte[] encoding); public static string GetDigestName(HashAlgorithmTag hashAlgorithm); public static int GetDigestIDForName(string name); public static string GetCurveName(DerObjectIdentifier oid); public static string GetSignatureName(PublicKeyAlgorithmTag keyAlgorithm, HashAlgorithmTag hashAlgorithm); public static string GetSymmetricCipherName(SymmetricKeyAlgorithmTag algorithm); public static int GetKeySize(SymmetricKeyAlgorithmTag algorithm); public static KeyParameter MakeKey(SymmetricKeyAlgorithmTag algorithm, byte[] keyBytes); public static KeyParameter MakeRandomKey(SymmetricKeyAlgorithmTag algorithm, SecureRandom random); public static KeyParameter MakeKeyFromPassPhrase(SymmetricKeyAlgorithmTag algorithm, S2k s2k, char[] passPhrase); public static KeyParameter MakeKeyFromPassPhraseUtf8(SymmetricKeyAlgorithmTag algorithm, S2k s2k, char[] passPhrase); public static KeyParameter MakeKeyFromPassPhraseRaw(SymmetricKeyAlgorithmTag algorithm, S2k s2k, byte[] rawPassPhrase); public static void WriteFileToLiteralData(Stream output, char fileType, FileInfo file); public static void WriteFileToLiteralData(Stream output, char fileType, FileInfo file, byte[] buffer); public static Stream GetDecoderStream(Stream inputStream); public PgpUtilities(); } }