public static byte[] GenerateAuthenticatorClient(String clientid,
			String key, String timestamp) throws NoSuchAlgorithmException {
		int sharekeylen = 0;
		if (key != null) {
			sharekeylen = clientid.length() + key.length() + 17;
		} else {
			sharekeylen = clientid.length() + 17;
		}
		byte tmpbuf[] = new byte[sharekeylen];
		int tmploc = 0;
		System.arraycopy(clientid.getBytes(), 0, tmpbuf, 0, clientid.length());
		tmploc = clientid.length() + 7;
		if (key != null) {
			System.arraycopy(key.getBytes(), 0, tmpbuf, tmploc, key.length());
			tmploc += key.length();
		}

		System.arraycopy((FormatTimeStamp(timestamp)).getBytes(), 0, tmpbuf, tmploc, 10);
		return MD5(tmpbuf);
	}