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

GenericKey

public class GenericKey
using Org.BouncyCastle.Asn1.X509; namespace Org.BouncyCastle.Crypto.Operators { public class GenericKey { private readonly AlgorithmIdentifier algorithmIdentifier; private readonly object representation; public AlgorithmIdentifier AlgorithmIdentifier => algorithmIdentifier; public object Representation => representation; public GenericKey(object representation) { algorithmIdentifier = null; this.representation = representation; } public GenericKey(AlgorithmIdentifier algorithmIdentifier, byte[] representation) { this.algorithmIdentifier = algorithmIdentifier; this.representation = representation; } public GenericKey(AlgorithmIdentifier algorithmIdentifier, object representation) { this.algorithmIdentifier = algorithmIdentifier; this.representation = representation; } } }