Code example for RSAPrivateKey

Methods: getModulus

0
     * 
     * 
     * @return 
     */ 
    public int getBitLength() { 
        return prvKey.getModulus().bitLength();
    } 
 
    /** 
     * 
     * 
     * @return 
     */ 
    public byte[] getEncoded() { 
        try { 
            ByteArrayWriter baw = new ByteArrayWriter();
 
            // The private key consists of the public key blob 
            baw.write(getPublicKey().getEncoded());
 
            // And the private data