Hash of Public Key

Discussion in 'iOS Development' started by mikexx, Apr 12, 2019.

  1. mikexx

    mikexx Newbie

    Hi,

    I want to calculate a fingerprint (sha256) of a public key of a certificate.
    I read the public key of a certificate (SecKeyRef), however, if I calculate the hash of the data, the hash is different to the hash I get from openssl.
    Does somebody has an idea how to calculate a sha256 of a public key (SecKeyRef)?

    My intention is to do public key pinning without any library.

    cheers,
    mike
     

Share This Page