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

Org.BouncyCastle.X509.Extension.AuthorityKeyIdentifierStructure

Create an AuthorityKeyIdentifier using the passed in certificate's public key, issuer and serial number.

Create an AuthorityKeyIdentifier using just the hash of the public key.