public String getPrivilegesString() {
		ArrayList<String> privs = new ArrayList<String>();
		
		int r = privileges;
		
		if (r == 0) {
			privs.add("(NONE)");
		} else {
			if ((r & (1<<7)) != 0) {
				r &= ~(1<<7);
				privs.add("Security Domain");
			}
			if ((r & (1<<4)) != 0) {
				r &= ~(1<<4);
				privs.add("Card lock");
			}
			if ((r & (1<<3)) != 0) {
				r &= ~(1<<3);
				privs.add("Card terminate");
			}
			if ((r & (1<<2)) != 0) {
				r &= ~(1<<2);
				privs.add("Default selected");
			}
			if ((r & (1<<1)) != 0) {
				r &= ~(1<<1);
				privs.add("CVM (PIN) management");
			}
		}
		String result = "";
		for (int i = 0; i < privs.size(); i++) {
			if (i != 0) {
				result += ", ";
			}
			result += privs.get(i);
		}
		
		// TODO: Wait until actual cards discovered
		if (r>0) {
			result += " " + Integer.toHexString(r);
		}
		
		return result.trim();
	}