computeKid static method

String computeKid(
  1. String pub
)

First 8 bytes, hex-encoded, of the SHA-256 of the public key material.

Implementation

static String computeKid(String pub) {
  // SHA256HashingAlgo.hash returns the full digest as lowercase hex; the
  // first 16 hex chars are the first 8 bytes.
  return SHA256HashingAlgo().hash(utf8.encode(pub)).substring(0, 16);
}