hash

fun hash(certificate: X509Certificate): ByteArray?

Hashes the DER encoding of certificate with the digest digestFor picks - the one the server hashes its own certificate with, so that both ends arrive at the same bytes.

Return

The hash, or null when the signature names no digest to hash with.

Throws

if the certificate cannot be encoded or the digest is unavailable in this JVM - either way there is nothing to bind to.