<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BundleResources",
  "identifier" : "/documentation/BundleResources/Information-Property-List/NSPinnedLeafIdentities/SPKI-SHA256-BASE64",
  "metadataVersion" : "0.1.0",
  "role" : "Property List Key",
  "symbol" : {
    "kind" : "Property List Key",
    "modules" : [
      "Bundle Resources"
    ],
    "preciseIdentifier" : "plist:Information_Property_List.NSPinnedLeafIdentities.SPKI-SHA256-BASE64"
  },
  "title" : "SPKI-SHA256-BASE64"
}
-->

# SPKI-SHA256-BASE64

The digest of an X.509 certificate’s Subject Public Key Info structure.

## Discussion

You represent a pinned certificate using the Base64-encoded SHA-256 digest of an X.509 certificate’s DER-encoded ASN.1 Subject Public Key Info (SPKI) structure. For a PEM-encoded public-key certificate stored in the file `ca.pem`, you can calculate the [`SPKI-SHA256-BASE64`](/documentation/BundleResources/Information-Property-List/NSPinnedLeafIdentities/SPKI-SHA256-BASE64) value with the following `openssl` commands:

```sh
% cat ca.pem |
      openssl x509 -inform pem -noout -outform pem -pubkey |
      openssl pkey -pubin -inform pem -outform der |
      openssl dgst -sha256 -binary |
      openssl enc -base64
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)