SubjectPublicKeyInfo info = new SubjectPublicKeyInfo((ASN1Sequence) new DERInputStream(
SubjectPublicKeyInfo info = new SubjectPublicKeyInfo((ASN1Sequence) new ASN1InputStream(
    public static SubjectKeyIdentifier createSubjectKeyId(PublicKey pubKey) {        try {            ByteArrayInputStream bIn = new ByteArrayInputStream(pubKey.getEncoded());            SubjectPublicKeyInfo info = new SubjectPublicKeyInfo((ASN1Sequence) new DERInputStream(                        bIn).readObject());            return new SubjectKeyIdentifier(info);        } catch (Exception e) {            throw new RuntimeException("error creating key");        }    } // createSubjectKeyId