Code example for PrivateKey

Methods: getAlgorithm

0
        if (digestAlgorithm == null) {
            if (privateKey == null) {
                return null; 
            } 
            else { 
                return "DSA".equals(privateKey.getAlgorithm()) ?
                        DIGEST_ALG_SHA1 : DIGEST_ALG_MD5;
            } 
        } 
        else { 
            return digestAlgorithm;
        } 
    } 
     
    /** 
     * Sets the digest algorithm to used in digital signing. 
     *  
     * @param digestAlgorithm the digest algorithm. 
     */ 
    public void setDigestAlgorithm(String digestAlgorithm) {