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());
        } 
    } 
 
    public void setSignatureAlgorithm( 
        String  signatureAlgorithm)
    { 
        this.signatureAlgorithm = signatureAlgorithm;
 
        sigOID = (DERObjectIdentifier)algorithms.get(Strings.toUpperCase(signatureAlgorithm));
 
        if (sigOID == null)