/**
  * Calculates the keyIdentifier using a SHA1 hash over the BIT STRING
  * from SubjectPublicKeyInfo as defined in RFC3280.
  *
  * @param spki the subject public key info.
  */
 public SubjectKeyIdentifier(
     SubjectPublicKeyInfo spki)
 {
     this.keyIdentifier = GetDigest(spki);
 }
 public void SetSubjectPublicKeyInfo(
     SubjectPublicKeyInfo pubKeyInfo)
 {
     this.subjectPublicKeyInfo = pubKeyInfo;
 }
 /**
  * Return a RFC 3280 type 1 key identifier. As in:
  * <pre>
  * (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
  * value of the BIT STRING subjectPublicKey (excluding the tag,
  * length, and number of unused bits).
  * </pre>
  * @param keyInfo the key info object containing the subjectPublicKey field.
  * @return the key identifier.
  */
 public static SubjectKeyIdentifier CreateSha1KeyIdentifier(
     SubjectPublicKeyInfo keyInfo)
 {
     return(new SubjectKeyIdentifier(keyInfo));
 }