code: def get_hpkp_pin(cls, certificate: cryptography.x509.Certificate) -> str:
          
          return b64encode(cls.get_public_key_sha256(certificate)).decode('utf-8')
docs: Generate the HTTP Public Key Pinning hash (RFC 7469) for the given certificate.