public static byte[] encrypt(byte[] data, String publicKey,
			String privateKey) throws Exception {

		// 生成本地密钥
		SecretKey secretKey = getSecretKey(publicKey, privateKey);

		// 数据加密
		Cipher cipher = Cipher.getInstance(secretKey.getAlgorithm());
		cipher.init(Cipher.ENCRYPT_MODE, secretKey);

		return cipher.doFinal(data);
	}