public static int createAccount(String name, byte[] pass)
			throws SQLException {
		PreparedStatement checkStatement = DatabaseManager
				.prepare("SELECT * FROM \"Users\" WHERE \"name\" = ?;");
		checkStatement.setString(1, name);
		ResultSet checkResult = checkStatement.executeQuery();
		DatabaseManager.registerResult(checkResult, checkStatement);
		Tuple[] checkTuples = Tuple.fromResultSet(checkResult);
		if (checkTuples.length != 0)
			throw new IllegalArgumentException(
					"A user with this name already exists!");
		DatabaseManager.clean(checkResult);

		byte[] salt = generateSalt();

		PreparedStatement statement = DatabaseManager
				.prepare("INSERT INTO \"Users\" (\"id\", \"name\", \"pass\", \"salt\")"
						+ " VALUES (?, ?, ?, ?);");

		byte[] salted = new byte[512];
		byte[] raw = new byte[pass.length + salt.length];
		System.arraycopy(pass, 0, raw, 0, pass.length);
		System.arraycopy(salt, 0, raw, pass.length, salt.length);
		SHA3Digest sha3 = new SHA3Digest(512);
		sha3.update(raw, 0, raw.length);
		sha3.doFinal(salted, 0);

		statement.setInt(1, getNextId());
		statement.setString(2, name);
		statement.setBytes(3, salted);
		statement.setBytes(4, salt);

		if (statement.executeUpdate() <= 0)
			throw new RuntimeException(
					"Create Account statement failed to create new account!");

		statement.close();
		try {
			return getId(name);
		} catch (UnknownUserException e) {
			throw new RuntimeException(
					"Create Account statement failed to create account!");
		}
	}