<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.11" />

Internal.Cryptography.PkcsHelpers

static class PkcsHelpers
namespace Internal.Cryptography { internal static class PkcsHelpers { public static byte[] Resize(this byte[] a, int size); public static void RemoveAt<T>(ref T[] arr, int idx); public static CmsRecipientCollection DeepCopy(this CmsRecipientCollection recipients); public static X509Certificate2Collection GetStoreCertificates(StoreName storeName, StoreLocation storeLocation, bool openExistingOnly); public static X509Certificate2 TryFindMatchingCertificate(this X509Certificate2Collection certs, SubjectIdentifier recipientIdentifier); public static string ToSkiString(this byte[] skiBytes); public static string ToBigEndianHex(this ReadOnlySpan<byte> bytes); public static string ToSerialString(this byte[] serialBytes); public static bool TryGetRsaOaepEncryptionPadding(ReadOnlyMemory<byte>? parameters, out RSAEncryptionPadding rsaEncryptionPadding, out Exception exception); public static void EnsureSingleBerValue(ReadOnlySpan<byte> source); public static byte[] EncodeOctetString(byte[] octets); public static byte[] DecodeOctetString(ReadOnlyMemory<byte> encodedOctets); public static string DecodeOid(ReadOnlySpan<byte> encodedOid); public static int FirstBerValueLength(ReadOnlySpan<byte> source); public static byte[] UnicodeToOctetString(this string s); public static string OctetStringToUnicode(this byte[] octets); public static ReadOnlyMemory<byte> DecodeOctetStringAsMemory(ReadOnlyMemory<byte> encodedOctetString); public static Oid CopyOid(this Oid oid); public static byte[] EncodeUtcTime(DateTime utcTime); public static DateTime DecodeUtcTime(byte[] encodedUtcTime); public static Pkcs9AttributeObject CreateBestPkcs9AttributeObjectAvailable(Oid oid, ReadOnlySpan<byte> encodedAttribute); public static System.Security.Cryptography.Asn1.AttributeAsn[] NormalizeAttributeSet(System.Security.Cryptography.Asn1.AttributeAsn[] setItems); public static System.Security.Cryptography.Asn1.AttributeAsn[] NormalizeAttributeSet(System.Security.Cryptography.Asn1.AttributeAsn[] setItems, out byte[] encodedValue); } }