byte数组加密解密

	/**
	 * 解密
	 */
	private byte[] decode(byte[] pBytes) throws Exception {
		Cipher mCipher = Cipher.getInstance("DES");
		mCipher.init(Cipher.DECRYPT_MODE, 获取key);

		return mCipher.doFinal(pBytes);
	}

	/**
	 * 加密
	 */
	private byte[] encode(byte[] pBytes) throws Exception {
		Cipher mCipher = Cipher.getInstance("DES");
		mCipher.init(Cipher.ENCRYPT_MODE, 获取key);

		return mCipher.doFinal(pBytes);
	}

你可能感兴趣的:(java,加密,解密,byte)