public static PrivateKey loadPrivateKey(String privateKeyStr) throws Exception {
		try {
			byte[] buffer = base64.decode(privateKeyStr);
			// X509EncodedKeySpec keySpec = new X509EncodedKeySpec(buffer);
			PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(buffer);
			KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
			return (RSAPrivateKey) keyFactory.generatePrivate(keySpec);
		} catch (NoSuchAlgorithmException e) {
			throw new Exception("无此算法");
		} catch (InvalidKeySpecException e) {
			throw new Exception("私钥非法");
		} catch (NullPointerException e) {
			throw new Exception("私钥数据为空");
		}
	}
public static PrivateKey loadPrivateKey ( String privateKeyStr ) throws Exception { try { byte [ ] buffer = base64 . decode ( privateKeyStr ) ; PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec ( buffer ) ; KeyFactory keyFactory = KeyFactory . getInstance ( KEY_ALGORITHM ) ; return ( RSAPrivateKey ) keyFactory . generatePrivate ( keySpec ) ; } catch ( NoSuchAlgorithmException e ) { throw new Exception ( "无此算法" ) ; } catch ( InvalidKeySpecException e ) { throw new Exception ( "私钥非法" ) ; } catch ( NullPointerException e ) { throw new Exception ( "私钥数据为空" ) ; } }
从字符串中加载私钥<br>
加载时使用的是PKCS8EncodedKeySpec（PKCS#8编码的Key指令）。

@param privateKeyStr
@return
@throws Exception