Code example for RSAPrivateKey

Methods: getPrivateExponent

0
 
            // The private key consists of the public key blob 
            baw.write(getPublicKey().getEncoded());
 
            // And the private data 
            baw.writeBigInteger(prvKey.getPrivateExponent());
 
            return baw.toByteArray();
        } catch (IOException ioe) {
            return null; 
        } 
    } 
 
    /** 
     * 
     * 
     * @return 
     */ 
    public SshPublicKey getPublicKey() { 
        return new SshRsaPublicKey(pubKey);
    }