Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * 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));
 }
Ejemplo n.º 3
0
 public void SetSubjectPublicKeyInfo(
     SubjectPublicKeyInfo pubKeyInfo)
 {
     this.subjectPublicKeyInfo = pubKeyInfo;
 }