Code example for PublicKey

Methods: getEncoded

0
        PublicKey       key)
    { 
        try 
        { 
            tbsGen.setSubjectPublicKeyInfo(new SubjectPublicKeyInfo((ASN1Sequence)new ASN1InputStream(
                                new ByteArrayInputStream(key.getEncoded())).readObject()));
        } 
        catch (Exception e)
        { 
            throw new IllegalArgumentException("unable to process key - " + e.toString());
        } 
    } 
 
    /** 
     * Set the signature algorithm. This can be either a name or an OID, names 
     * are treated as case insensitive. 
     *  
     * @param signatureAlgorithm string representation of the algorithm name. 
     */ 
    public void setSignatureAlgorithm( 
        String  signatureAlgorithm)